Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the iptables configuration script code in ubuntu

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces what the iptables configuration script code is in ubuntu. It is very detailed and has a certain reference value. Friends who are interested must read it!

Bash/shell

#! / bin/bash #! / bin/bash case "$1" in start) echo-n "Staring to write your Iptbales:..." / sbin/iptables-F / sbin/iptables-X / sbin/iptables-Z / sbin/iptables-An INPUT-I lo-j ACCEPT / sbin/iptables-An INPUT-m state-- state ESTABLISHED RELATED-j ACCEPT / sbin/iptables-An INPUT-p icmp- m icmp--icmp-type 8-j DROP / sbin/iptables-An INPUT-p tcp-m tcp-dport 22-j ACCEPT / sbin/iptables-An INPUT-p tcp-m tcp-dport 80-j ACCEPT / sbin/iptables-An INPUT-p tcp-m tcp-dport 3306-j ACCEPT / sbin/iptables-P INPUT DROP echo "OK" ; stop) echo-n "Stop iptables...." / sbin/iptables-P INPUT ACCEPT / sbin/iptables-F / sbin/iptables-X / sbin/iptables-Z echo "OK";; *) echo "Usage: $0 {start | stop}" Esac above is all the content of the article "what is the iptables configuration script code in ubuntu?" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report