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 = ""
Introduced
Iptables is an IP packet filtering system integrated with the latest version 3.5 Linux kernel. If a Linux system is connected to an Internet or LAN, a server, or a proxy server that connects LAN and the Internet, the system facilitates
If there are many ports and are sorted, use the port range statement. for example, Port 40100: 40109 indicates port 40100 to Port 40109. if you do not know the basic knowledge of IPTABLES, we recommend that you first check it out. configure a filter
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
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
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,
Iptables official website: Alibaba
IptablesHttp://netfilter.org/
Path of the data packet passing through the firewall
Port prohibited
Force access to a site
Publish an internal network server
Intelligent DNS
Port ing
Access through NAT
Save and
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.