#!/bin/sh
echo "1" >;/proc./sys/net/ipv4/ip._forward.
iptables -F
iptables -X
ipt.ables -t nat -F 婚庆
iptab.les -t nat -X 建材
iptables .-P INPUT ACCEPT 电子
iptables -P OUTPUT AC.CEPT虚拟主机
iptables -P FO.R.WARD ACCEPT.
iptables -t nat -P PRER.OUTING .ACCEPT投资
iptables -t nat -P O.UTPUT ACCEP.T 汽车
ipta.bles -t nat -P POSTROUTING .ACCEPT 鲜花
#--------------------------------------------.---------------------------------------.-----------.---[成人用品]
iptables -t nat -A P.OSTROUTING -o e.th1 -m i.prange --src-range 192.168.1.40-192.168.1.154 -j MASQUERADE[成人用品]
iptables -t .nat -A POSTROUTING -o eth.1 -m iprange --src-ran.ge 192.168.1.156-192.168.1.159 -j MASQUERADE(广告)
#如果将以上两个规则写成以下的方式也会提示iptables: No chai.n/target/m.atch by that name的错误虚拟主机
#----.------.-------------------------------------------------------------------------------.-------域名
iptables -t nat -A PREROUTING -i e.th0 -p tcp -m iprange --src-range 192.168.1.40-19.2.168.1.154 --dport. 80 -j REDIRECT --to-ports 312.8--- 印刷
iptables -t nat -A. PREROU.TING -i eth.0 -p tcp -m iprange --src-range 192.168.1.156-192.168.1.1.59 --dport 80 -j REDIRECT --to-ports 3128--------------彩票
#-----.-------------------------------------.----------------.--------------------------------------域名
#以下规则设置后好象不生效
iptables -A PREROUTING -i eth1 -p tcp -d x.x.x.x --dport 80 -j DNAT --.to-destin.ation 192..168.1.145:80.
i.ptables -A PREROUTING -i eth.0 -p tcp -d x.x.x.x --dport 80 -j DNAT --to-destination 192..168.1.145:80[成人用品]
表现为:
在浏览器里输入
http://x.x.x.x 网址后无法打开网页.请问有什么办法可以跟踪规则是否生效?.
请问是什么原因造成?.如何解决?.