[H-GEN] can't get IP forwarding/NAT working on new install

Troy Piggins troy at piggo.com
Tue Jun 6 01:18:08 EDT 2006


* Troy Piggins <troy at piggo.com> :
> 
[snip] 
> eg:  WinXP machine can ping 192.168.0.1, but try to ping 192.168.1.10 and get
> "Destination host unreachable".  Sim for 192.168.1.1.  See below for what
> networks they are on.
> 
> The dapper machine connects to internet fine, resolves URLs no worries, can
> ping both internal and external networks fine.  All good.
> 
> I've trawled the net, Ubuntu forums, Whirlpool forums, USENET, Ubuntu mailing
> lists and can't find a solution.  It's probably right in front of my nose, I
> know.
> 
> Some details:
> 
> **** ADSL router - network interface 192.168.1.1/255.255.255.0,
>  DHCP server enabled,
> # route -n
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
> 203.55.228.88   0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
> 192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 br0
> 239.0.0.0       0.0.0.0         255.0.0.0       U     1      0        0 br0
> 0.0.0.0         203.55.228.88   0.0.0.0         UG    0      0        0 ppp0
> 
> **** Dapper machine (armadillo)
> connection to router:
> eth0      Link encap:Ethernet  HWaddr 00:40:05:0E:85:0B
>           inet addr:192.168.1.10  Bcast:192.168.1.255  Mask:255.255.255.0
> connection to LAN:
> eth1      Link encap:Ethernet  HWaddr 00:0C:6E:03:B6:0B
>           inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
> [troy at armadillo:~]$ route -n
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
> 192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
> 192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
> 0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth0
> 
> $ cat /etc/sysctl.conf | grep ^[^\#]
> net/ipv4/ip_forward=1
> 
> $ sudo iptables-save | grep MASQUERADE
> -A POSTROUTING -o eth0 -j MASQUERADE 
> -A POSTROUTING -s 192.168.0.0/255.255.255.0 -j MASQUERADE 
> 
> **** WinXP machine
> IP 192.168.0.3/255.255.255.0
> default gateway 192.168.0.1
> DNS server 192.168.0.1

What I didn't include before was this from the WinXP machine.

>route print

 ===========================================================================
 Interface List
 0x1 ........................... MS TCP Loopback interface
 0x2 ...00 0f ea 3d c1 02 ...... Realtek RTL8169/8110 Family Gigabit
 Ethernet NIC - Packet Scheduler Miniport
 ===========================================================================
 ===========================================================================
 Active Routes:
 Network Destination        Netmask      Gateway       Interface Metric
           0.0.0.0  255.255.255.255  192.168.0.1     192.168.0.3      1
         127.0.0.0        255.0.0.0    127.0.0.1       127.0.0.1      1
       192.168.0.0    255.255.255.0  192.168.0.3     192.168.0.3     20
       192.168.0.3  255.255.255.255    127.0.0.1       127.0.0.1     20
     192.168.0.255  255.255.255.255  192.168.0.3     192.168.0.3     20
         224.0.0.0        240.0.0.0  192.168.0.3     192.168.0.3     20
   255.255.255.255  255.255.255.255  192.168.0.3     192.168.0.3      1
 Default Gateway:       192.168.0.1
 ===========================================================================
 Persistent Routes:
   Network Address          Netmask  Gateway Address  Metric
           0.0.0.0  255.255.255.255      192.168.0.1       1

Note the 255.255.255.255 netmasks.  I don't think I put them there, but maybe I
did typo them.

How do I fix that?  There is nothing in network properties about routes, and I
am not up with WinXP's shell commands.

-- 
Troy Piggins
  ,-o   Ubuntu v6.06 (Dapper Drake): kernel 2.6.15-23-server, 
 o   )  postfix 2.2.4, procmail 3.22, mutt 1.5.11i,
  `-o   slrn 0.9.8.1, vim 6.4




More information about the General mailing list