我在gateway: eth0 : 连接internet eth1 : 连接lan 我因用VPN,使用防火墙(部分): iptables -F iptables -P INPUT ACCEPT iptables -P OUTPUT ACCEPT iptables -P forward DROP iptables -A forward -s 192.168.0.0/24 -j ACCEPT # Keep state of connections from local machine and private subnets iptables -A OUTPUT -m state --state NEW -o eth0 -j ACCEPT iptables -A INPUT -m state --state ESTABLISHED,RELATED -...
by dreamwaver - 网络与硬件 - 2004-08-03 10:30:53 阅读(2299) 回复(4)
用以下命令 iptables -F iptables -F -t nat iptables -F -t mangle iptables -P forward DROP (当我把这行注释掉就能上网,打开就不能上) iptables -A forward -s 192.168.0.0/16 -p tcp --dport 80 -j ACCEPT iptables -A forward -s 192.168.0.0/16 -p tcp --dport 53 -j ACCEPT iptables -A forward -p tcp -m state --state ESTABLISHED,RELATED -J ACCEPT iptables -t nat -A POSTROUTING -s 192.168.0.0/16 -j MASQUERAD...
我的规则: Chain forward (policy DROP) target prot opt source destination DROP all -- 0.0.0.0/0 0.0.0.0/0 ipp2p v0.8.1_rc1 --bit ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 先是用iptables -P forward DROP 测试后发现内网机器啥都访问不了,比如WEB,PING,但我加了 iptables -A forward -p icmp -j ACCEPT后,可以PING外网,奇怪的...
http://hi.baidu.com/3444542/blog/category/Python 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/84469/showart_1664243.html
iptables 中的forward 的转发是怎样使用! 比如 host1 连接外网,有两个ip ,eth内,eth外,client 通过host1来上网,如果想限制client 的上网,如何使用iptables ,请解释一下forward 的具体使用!
局域网中用的是附录中的结构 用的squid做代理 局域网内的客户机可以上网 但用iptables -A forward -p TCP -j LOG --log-level info没有任何包的信息 为何呢? 请教高人指点
kernel:2.4.30,iptables :1.2.11 提示: iptables v1.2.11: unknown protocol `ospf' specified Try `iptables -h' or 'iptables --help' for more information. 但是我将命令换成:iptables -D forward -p 89 -j ACCEPT(ospf的协议号)就可以,请问这是什麽原因,linux下有没有保存协议号信息的文件 [ 本帖最后由 liyanux 于 2006-5-22 16:06 编辑 ]
是这样的,我们都知道这样的一个语句是无效的 iptables -A forward -d www.sex.com -j DROP 以前我看过文章 说,以为升级了iptables会有用!但是实际中是没有用的! 如果我要禁止别人上一个网站(网站ip是动态的)以前在2.4下面可以用string,除了这个还有其它办法吗? 谢谢
linux9 双网卡做NAT , eth0 接 ISP, eth1 接局域网, 现在想设置 eth1发出的包的TTL值更改为1, 请问iptables 里怎么写规则? 用途: 限制局域网里的代理. 这是现在使用的规则: -A POSTROUTING -s 192.168.0.0/255.255.255.0 -o eth0 -j MASQUERADE -A forward -eth1 -s 192.168.0.* -j ACCEPT -A forward -i eth0 -o eth1 -j ACCEPT -P forward -j DROP
iptables forward Chain default 设成 allow 有什么问题? 有个问题想了很久,觉得有问题但是又不肯定,我在 iptables 防火墙上设置如下规则: iptables -P INPUT DROP iptables -P OUTPUT ACCEPT iptables -P forward ACCEPT iptables -A INPUT -p TCP -s 0/0 --dport 22 -j ACCEPT 把 forward 和 OUTPUT 设成 ACCEPT 在 INPUT 只允许 22 端口,服务器有两块网卡,一块内网,一块外网.这样能不能起到保护作用? 如果不能有什么危害?
iptables -A forward -p tcp --syn -m limit --limit 1/s --limit-burst 5 -j ACCEPT 中的--limit 1/s 或--limit-burst 5详细的怎么理解和解释