[Wolves] Masquerading

Robert Smith wolves at mailman.lug.org.uk
Sat Mar 8 11:50:02 2003


Hi

I am having problems geting internet access via 1 of my interfaces on my 
server. I can access the internet via a 10BaseT connection via HUB etc into 
eth1 on my server and it get masqueraded out eth0 no problems. But if I try 
and gain access via a 100BaseT connection to eth2 on my server I cannot 
connect to the internet.

I use the following lines to set up my masquerading:

iptables -t nat -F POSTROUTING

iptables -t nat -A POSTROUTING -o eth0 -s 10.1.0.0/255.255.0.0 -j MASQUERADE

iptables -t nat -A POSTROUTING -o eth0 -s 10.1.1.0/255.255.255.0 -j MASQUERADE

echo 1 > /proc/sys/net/ipv4/ip_forward

I have dropped my firewall using the following commands so that is not the 
problem:

iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT

Befroe someone asks if the connection works it does, i can get ssh access to 
my server via the 100BaseT connection I can also access the http server on my 
server :

lynx 10.1.0.2

that works so its no issue with port 80

/etc/network/interfaces on my workstation:

 /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
auto lo
iface lo inet loopback

# The first network card - this entry was created during the Debian 
installation
# (network, broadcast and gateway are optional)
auto eth0
iface eth0 inet static
        address 10.1.0.1
        netmask 255.255.0.0
        network 10.1.0.0
        gateway 10.1.0.2

#       address 10.0.0.1
#       netmask 255.255.255.0
#       network 10.1.1.0
#       gateway 10.0.0.2

it is remmed to work via the HUB and 10BAseT network at prestent

/etc/network/interfaces on my server eth0 is my BY connection, eth1 is 10BaseT 
and eth2 Is 100BaseT
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
auto lo
iface lo inet loopback

# The first network card - this entry was created during the Debian 
installation

auto eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet static
address 10.1.0.2
netmask 255.255.0.0
network 10.1.0.0

auto eth2
iface eth2 inet static
address 10.0.0.2
netmask 255.255.255.0
network 10.1.1.0

Well that seems most of the info that mite be needed anybody got any ideas??

Kernel: 2.4.20
Distro: Debian Testing

for both boxes

Rob Smith
robert@rob-smith.org.uk