|
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
# ADD a static route for E-gov.
route add -net 21.0.0.0 netmask 255.0.0.0 gw 192.168.120.2 dev eth0
# Start ADSL Connection
echo "Starting ADSL connection...."
/usr/sbin/adsl-start
# Initialize NAT rules and firewalls
iptables -F
iptables -t nat -F
modprobe ip_tables
modprobe iptable_nat
modprobe iptable_filter
modprobe ip_conntrack_ftp
modprobe ip_nat_ftp
modprobe ipt_state
# Iptables Rules
echo "Starting IPTABLES RULES ...."
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
# echo "Updating Dynamic domain of hzwsj.3322.org....."
/root/ez-ipupdate-3.0.10-linux-i386/ez-ipupdate -c /root/ez-ipupdate-3.0.10-linux-i386/qdns.conf
# echo "DNAT PPP0 to an internal web server(192.168.120.33:80)....."
/sbin/iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 80 -j DNAT --to-destination 192.168.120.33:80
ADSL拨号,域名(abc.3322.org)解析正常, 1)从internet访问http://abc.3322.org正常.
2) 内部从SNAT上internet也正常, 但就是 内部LAN访问http://abc.3322.org不行,也即
192.168.120.x/24访问http://192.168.120.33可以,但访问htt://(abc.3322.org解析出来的ppp0不行),
昨天弄了一中午/下午都不行, 哪位XD熟悉,请指教,万分感谢..ing
|
|