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,
What is Iptables-general Linux technology-Linux technology and application information? For more information, see. Iptables is a packet filtering management tool based on the netfilter architecture. It is mainly used for firewall or transparent
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 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
For more information about IPTABLES configuration in linux-general Linux technology-Linux technology and application information, see the following. Simple Application of IPTABLES:
Iptables-a input-p tcp-s 10.1.2.187-j ACCEPT
Add 10.1.2.187 to the
Three tables are created: natmangle and filterfilter preset rule tables, there are three rule chains: INPUT, FORWARD, and OUTPUT. INPUT enters the FORWARD forwarding OUTPUT and goes out. ACCEPT releases the REJECT to block the packet. DROP the
Instance:#iptables-T filter-a input-s 172.16.0.0/16-d 172.16.100.7-j Drop the source address of the 172.16.0.0 network segment, the access 172.16.100,7 packets are discarded.#iptables-L-N View rules for the filter table#iptables-T Nat-l-n View rules
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.