[Linux Centos] Default file: /etc/sysconfig/iptables

ID Topic: 30684 • Có 943 lượt xem
Hình đại diện của thành viên
#1 - @377592
30/01/2015 02:08
iptables là một chương trình chạy ở không gian người dùng, cho phép người quản trị hệ thống có thể cấu hình các bảng của tường lửa trong nhân Linux (được cài đặt trong các mô đun Netfilter khác nhau) và lưu trữ các chuỗi, luật. Các mô đun nhân và chương trình khác nhau được áp dụng cho từng giao thức; iptables cho IPv4, ip6tables cho IPv6, arptables cho ARP, và ebtables cho Ethernet frames.

iptables is a user-space application program that allows a system administrator to configure the tables provided by the Linux kernelfirewall (implemented as different Netfilter modules) and the chains and rules it stores. Different kernel modules and programs are currently used for different protocols; iptables applies to IPv4, ip6tables to IPv6, arptables to ARP, and ebtables to Ethernet frames.


Default file iptables open full port:
Mã:# Generated by iptables-save v1.4.7 on Mon Dec 23 15:32:07 2013
*filter
:INPUT ACCEPT [396:30624]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [216:23216]
COMMIT
# Completed on Mon Dec 23 15:32:07 2013


Only open port 22, 80, 3306
Mã:# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
# Completed on Mon Dec 23 15:32:07 2013


Restart iptables:
Mã:service iptables restart
(Cốc Cốc 45.0)
PM|Trích|Like|Sửa|Xóa|Báo cáo|Cảnh cáo
Sửa lần cuối: nghiammo1992 28/09/2015 15:51
_______________
Diễn đàn chia sẻ kiến thức máy tính:
KETNOI123.COM

Ấn hiện ra để xem chữ ký của mình:
Trả lời nhanh

Chủ đề tương tự