We recommend a good iptables-shell script to free you from the troublesome iptables configuration. I am not sure who the script author is, so I deleted the version declaration. system: centos5.9 script content: viiptables. sh #! /Bin/sh # -----------
The code is as follows
Copy Code
#!/bin/sh#------------------------------------------------------------------------------# for debugging use Iptables-v.Iptables= "/sbin/iptables"Ip6tables= "/sbin/ip6tables"Modprobe=
1 iptables good script (reference)
Quote:
[Root @ server ~] # Cat/opt/iptables. Rule
#! /Bin/bash
#
# The interface that connect Internet
Extif = "ppp0"
# The inside interface. If you don't have this one
# And you must let this be black ex> inif = ""
Need to open port 80, specify IP and LAN
The following three lines mean:
Shut down all 80 ports first.
Open 80 ports of IP segment 192.168.1.0/24 end
Open IP Segment 211.123.16.123/24 80 port IP Segment
# iptables-i input-p TCP--dport 80-j DROP
Http://os.51cto.com/art/201107/273443.htm"51CTO exclusive feature" Linux system administrators have been exposed to netfilter/iptables, this is the Linux system comes with a free firewall, the function is very powerful. In the following
1. Show the status of the firewallRun the following command with root privileges:
# iptables-l-n-v
Parameter description:
-L: Lists the rules.
-V: Displays detailed information. This option displays the interface name,
The method for starting and stopping iptables depends on the Linux release version in use. you can view the documentation of the Linux version in use. In RedHat, start iptables with: # serviceiptablesstart. generally, iptables is already included in
Install iptables Firewall
If you do not install iptables you need to install first, CentOS execution:
Yum Install Iptables
Debian/ubuntu Execution:
Apt-get Install Iptables
On the VPS on the week nine Iptables set to:
*nat:P rerouting ACCEPT [7
Netfilter/iptables is an IP information packet filtering system integrated with the latest Linux kernel version 2.4.x. If the Linux system is connected to the Internet or LAN, server, or a proxy server connected to the LAN and Internet, the system
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.