[CUWiN-Dev] ipnat question + patch
Bill Comisky
bcomisky at pobox.com
Wed Apr 20 17:07:35 CDT 2005
The CUWiN gateway in our testbed (currently rev 3014) is mapping
10.0.0.0/8 to the address received via DHCP from the LAN in the
/etc/ipnat.conf file. Like:
map sip0 10.0.0.0/8 -> 192.168.2.104/32 portmap tcp/udp 10000:20000
map sip0 10.0.0.0/8 -> 192.168.2.104/32
Should this be "169.254.0.0/16 -> ..." now? We recently cannibalized our
HSLS testbed, and in putting it back together I found I couldn't ping from
a standalone node through the CUWiN gateway to our local LAN or internet.
I ran tcpdump on a machine on our LAN while trying to ping it from the
standalone CUWiN box, and saw echo replies going to the 169.254.x.x
address instead of 192.168.2.104 (CUWiN gateway). When I added the map
from 169.254.0.0/16 in /etc/ipnat.conf, I could ping out fine. This
problem may have been masked in the past because I had set up a static
route on our router for 169.254.x.x through the CUWiN gateway so I could
access nodes directly from our LAN.
Attached is a patch to extras/etc/dhclient-exit-hooks (writes ipnat.conf)
to switch the mapping. Could be the cause for the symptoms that Sascha
was seeing (having to manually ssh to the gateway first to get to the
internet).
bill
--
Bill Comisky
bcomisky at pobox.com
-------------- next part --------------
=== extras/etc/dhclient-exit-hooks
==================================================================
--- extras/etc/dhclient-exit-hooks (revision 3014)
+++ extras/etc/dhclient-exit-hooks (local)
@@ -8,9 +8,9 @@
rewrite_ipnat_conf()
{
[ -r /etc/ipnat.conf ] && grep -v "^map $interface" < /etc/ipnat.conf
- echo -n "map $interface 10.0.0.0/8 -> $new_ip_address/32 "
+ echo -n "map $interface 169.254.0.0/16 -> $new_ip_address/32 "
echo "portmap tcp/udp 10000:20000"
- echo "map $interface 10.0.0.0/8 -> $new_ip_address/32"
+ echo "map $interface 169.254.0.0/16 -> $new_ip_address/32"
}
case $reason in
More information about the CU-Wireless-Dev
mailing list