Forum OpenACS Q&A: Response to Web site connection problem

Collapse
Posted by Taka Chan on
Content of my rc.firewall:

/sbin/ipchains -F
/sbin/ipchains -P forward DENY
/sbin/ipchains -A forward -s 192.168.0.0/24 -j MASQ

/sbin/ipchains -F
/sbin/ipchains -P forward DENY
/sbin/ipchains -A forward -s 192.168.0.0/24 -j MASQ

EXTIP=`ifconfig eth0 | awk '/inet addr:/ { gsub(".*:", "", $2) ; print $2 }'`

/sbin/ipchains -A input -i eth0 -p tcp -s 0.0.0.0/0 80 -d $EXTIP/32 80 -j ACCEPT
/sbin/ipchains -A output -i eth0 -p tcp ! -y -s 192.168.0.100/32 80 -d 0.0.0.0/0 -j ACCEPT

/usr/sbin/ipmasqadm portfw -f

# The following ports are used by ICQ to receive files
/usr/sbin/ipmasqadm portfw -a -P tcp -L $EXTIP 2000 -R 192.168.0.102 2000
/usr/sbin/ipmasqadm portfw -a -P tcp -L $EXTIP 2001 -R 192.168.0.102 2001
/usr/sbin/ipmasqadm portfw -a -P tcp -L $EXTIP 2002 -R 192.168.0.102 2002
/usr/sbin/ipmasqadm portfw -a -P tcp -L $EXTIP 2003 -R 192.168.0.102 2003
/usr/sbin/ipmasqadm portfw -a -P tcp -L $EXTIP 2004 -R 192.168.0.102 2004
/usr/sbin/ipmasqadm portfw -a -P tcp -L $EXTIP 2005 -R 192.168.0.101 2005
/usr/sbin/ipmasqadm portfw -a -P tcp -L $EXTIP 2006 -R 192.168.0.101 2006
/usr/sbin/ipmasqadm portfw -a -P tcp -L $EXTIP 2007 -R 192.168.0.101 2007
/usr/sbin/ipmasqadm portfw -a -P tcp -L $EXTIP 2008 -R 192.168.0.101 2008
/usr/sbin/ipmasqadm portfw -a -P tcp -L $EXTIP 2009 -R 192.168.0.101 2009

/usr/sbin/ipmasqadm portfw -a -P tcp -L $EXTIP 80 -R 192.168.0.100 80

Two days before, something very strange happened. I have not done my configuration changes on my gateway, but I can connect to it from my office suddenly. During these two days, I had tried to connect to my gateway from office, sometimes fails but sometims success.

I really don't know what is going wrong, and the virtual domain of my site is bear.no-ip.com.