iptables -P input DROP iptables -A input -i lo -j ACCEPT iptables -A input -i eth1 -p tcp --dport 22 -j ACCEPT iptables -A input -i eth1 -p tcp --dport 3128 -j ACCEPT ....... iptables -A input -j MIRROR这句话什么意思. .默认规则是DROP啊,末经允许的请求是DROP,反弹什么东西啊 原文如下: http://bbs.chinaunix.net/viewthread.php?tid=353019&extra=&page=1
iptables -t filter -A input -s 192.168.1.2 -j DROP 我是否写错了,我的本意是让192.168.1.2 不能ping通我的linux
据我所知,filter表中的input链是对外部进入本机的数据包进行过滤的。应该是不会对内部的数据包进行限制的吧? 但今天我碰到了一个问题,让我想不明白。 我的服务器上iptables的设置是filter表中input链默认DROP,OUTPUT和FORWARD链默认都是ACCEPT。nat和mangle表都是ACCEPT。 服务器上运行oracle,默认打开1521端口,该端口是对内部和外部都开放的。 现在问题是,我在服务器中运行“telnet localhost 1521” 时不能连接。整个ipta...
我的iptables是1.2.8版本,好像不能执行iptables -A input -p tcp --dport 5800 -j DROP,还有别的有效命令可以关闭某一个端口吗。多谢。:em06: [ 本帖最后由 hayley 于 2006-5-11 09:57 编辑 ]
[code][root@3cis-dxie ~]# iptables -L Chain input (policy ACCEPT) target prot opt source destination RH-Firewall-1-input all -- anywhere anywhere Chain FORWARD (policy ACCEPT) target prot opt source destination RH-Firewall-1-input all -- anywhere anywhere Chain OUTPUT (policy ACCEPT) target prot opt source destin...
内网 eth0 外网 eth1 eth2 [code] iptables -P input DROP iptables -P OUTPUT ACCEPT iptables -P FORWARD ACCEPT iptables -A input -i lo -j ACCEPT iptables -A input -i eth0 -j ACCEPT iptables -A input -p tcp --dport 22 -m state --state NEW -j ACCEPT iptables -A input -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -t nat -I PREROUTING -p tcp -d 219.13.17.70 --dport 8880 -j DNAT --to 192.168.1....
有点糊涂了 :wink: [quote]#ping自己: [root@localhost root]# ping -c 1 127.0.0.1 PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data. 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.132 ms --- 127.0.0.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.132/0.132/0.132/0.000 ms #过滤掉从localhost发出的icmp包 [root@localhost root]# iptables -A ...
请问在什么环境情况下主要使用FORWARD,PREROUTING,SNAT,DNAT,input,OUTPUT啊? 例子看多了,有些晕了! 不知该用哪个? 前提: iptables各命令用法,概念(只限名词解释)了解! squid透明代理用一些转换 20台客户机 --------->; RH Linux 9.0 (squid+iptables) --------->; 外网 在这种环境下是用 FORWARD,SNAT等命令好呢?还是直接用input,OUTPUT定义呢? 看都有些例子里就用INOUT,OUTPUT之类的,有些例子了又全是PREROUTING,FORWARD之...