Help with firewall/masquerading problem
From: Alex Meov (alex_me_ov_at_yahoo.com)
Date: 05/29/04
- Next message: Bernd Nies: "ls hangs on NFS share from Apple Xserve"
- Previous message: Ohmster: "Re: Need quick setup help - virtual domains please!"
- Next in thread: Ian Northeast: "Re: Help with firewall/masquerading problem"
- Reply: Ian Northeast: "Re: Help with firewall/masquerading problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 28 May 2004 23:32:36 -0400
Hello! I am looking for help fixing the following problem
on my home network.
My mini-network consists of a Linux firewall (Debian,
2.4.22 kernel, masquerading with iptables) and the main
workstation (Linux/Windows). The firewall has 2 NICs:
one (eth0, 10.11.1.119) connected to the ISP's network through
a cable modem; another NIC (eth1, 192.168.0.1) is connected to
the workstation. The workstation has one NIC (192.168.0.2).
The firewall seems to be working, i.e. one cannot connect
to 192.168.0.2 or ping it from the outside. However, one CAN see
and ping 192.168.0.1 from the ISP's 10.11.X.X network. This,
understandably, makes the ISP unhappy (they did check that they
are pinging my box and not someone else's 192.168.0.1 by looking
at MAC addresses).
Can anyone suggest how I can stop 192.168.0.1 from being seen on
the outside (10.11.X.X) network or point me to the relevant
manpages/documentation/FAQ?
Any help is greatly appreciated!
-- Alex
This is the firewall script that runs on startup on the firewall:
##################################################
[skip: load modules...]
IPTABLES=/sbin/iptables
EXTIF="eth0"
INTIF="eth1"
echo "External interface $EXTIF, internal interface $INTIF"
echo "1" > /proc/sys/net/ipv4/ip_forward
echo "1" > /proc/sys/net/ipv4/ip_dynaddr
echo "Clearing existing rules and setting default policy"
$IPTABLES -P INPUT ACCEPT
$IPTABLES -F INPUT
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -F OUTPUT
$IPTABLES -P FORWARD DROP
$IPTABLES -F FORWARD
$IPTABLES -t nat -F
echo "Allow all connections out and only existing and related in"
$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT
$IPTABLES -A FORWARD -j LOG
echo "Enabling SNAT (MASQUERADE) functionality on $EXTIF"
$IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE
###### This is the output of /sbin/route on the firewall ######
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth1
10.11.0.0 * 255.255.0.0 U 0 0 0 eth0
default 10.11.1.5 0.0.0.0 UG 0 0 0 eth0
- Next message: Bernd Nies: "ls hangs on NFS share from Apple Xserve"
- Previous message: Ohmster: "Re: Need quick setup help - virtual domains please!"
- Next in thread: Ian Northeast: "Re: Help with firewall/masquerading problem"
- Reply: Ian Northeast: "Re: Help with firewall/masquerading problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|