linux下IPTABLES配置详解
2015-06-10 17:32
656 查看
如果你的IPTABLES基础知识还不了解,建议先去看看:《Iptables静态防火墙基础教程》
开始配置
我们来配置一个filter表的防火墙.
(1)查看本机关于IPTABLES的设置情况
[root@tp ~]# iptables -L -n
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain RH-Firewall-1-INPUT (0 references)
target prot opt source destination
ACCEPT all — 0.0.0.0/0 0.0.0.0/0
ACCEPT icmp — 0.0.0.0/0 0.0.0.0/0 icmp
type 255
ACCEPT esp — 0.0.0.0/0 0.0.0.0/0
ACCEPT ah — 0.0.0.0/0 0.0.0.0/0
ACCEPT udp — 0.0.0.0/0 224.0.0.251 udp
dpt:5353
ACCEPT udp — 0.0.0.0/0 0.0.0.0/0 udp
dpt:631
ACCEPT
开始配置
我们来配置一个filter表的防火墙.
(1)查看本机关于IPTABLES的设置情况
[root@tp ~]# iptables -L -n
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain RH-Firewall-1-INPUT (0 references)
target prot opt source destination
ACCEPT all — 0.0.0.0/0 0.0.0.0/0
ACCEPT icmp — 0.0.0.0/0 0.0.0.0/0 icmp
type 255
ACCEPT esp — 0.0.0.0/0 0.0.0.0/0
ACCEPT ah — 0.0.0.0/0 0.0.0.0/0
ACCEPT udp — 0.0.0.0/0 224.0.0.251 udp
dpt:5353
ACCEPT udp — 0.0.0.0/0 0.0.0.0/0 udp
dpt:631
ACCEPT
相关文章推荐
- Linux 内核基础--rb_tree使用方法
- 记VM安装CENTOS出错
- 虚拟机中centos重启后不能进入系统的问题
- Linux 系统启动过程
- LINUX服务器之间用Rsync同步数据
- 初学者如何玩好Linux系统?
- objective-c如何在linux下进入Modern模式
- objective-c如何在linux下进入Modern模式
- CentOS6.6 安全加固及性能优化
- objective-c如何在linux下进入Modern模式
- linux下的数据备份工具rsync
- linux系统优化项
- linux给普通用户增加sudo权限
- CentOS安装mysql*.rpm提示conflicts with file from package的解决办法
- 【linux记录贴】常用命令行
- CentOS7安装iptables防火墙
- (译文)The Linux Programming Interface:第1章(历史和标准)
- Linux的Local设置
- linux合并文件并替换
- centos6.5安装zabbix2.4.5