redhat 6.2 and NAT with iproute

From: TTK (ttk22_bas_at_free.fr)
Date: 07/31/03


Date: 31 Jul 2003 15:18:10 GMT


Hi

My network is 172.22.72.x. One machine (172.22.72.60) has a
modem. The IP 172.22.72.59 is free. At the other end of the
RTC line theres a web server called 172.18.48.169.

I'd like to be able to connect to this web server from one
client on my network using the .59 address, being redirected
by .60 through the modem to the web server.

ipchains can't do DNAT, so I installed iproute from the CD.

The doc says I should type:
 ip route add nat 172.22.72.59 via 172.18.48.169

But I get this error:
 RTNETLINK answers: Invalid argument

What am I doing wrong ?

ip route show output:
 172.18.48.169 via 172.18.48.169 dev sl0
 172.18.48.169 dev sl0 scope link src 192.168.60.15 metric 1
 172.22.72.60 dev eth0 scope link
 172.22.72.0/24 dev eth0 proto kernel scope link src 172.22.72.60
 127.0.0.0/8 dev lo scope link
 default via 172.22.72.136 dev eth0
 default dev sl0 scope link src 192.168.60.15 metric 1

ifconfig output:
 eth0 Link encap:Ethernet HWaddr 00:02:B3:0C:F2:A1
           inet addr:172.22.72.60 Bcast:172.22.72.255 Mask:255.255.255.0
           UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
           RX packets:3 errors:0 dropped:0 overruns:0 frame:0
           TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
           collisions:3 txqueuelen:100
           Interrupt:17 Base address:0x9000

 lo Link encap:Local Loopback
           inet addr:127.0.0.1 Mask:255.0.0.0
           UP LOOPBACK RUNNING MTU:3924 Metric:1
           RX packets:22 errors:0 dropped:0 overruns:0 frame:0
           TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0

 sl0 Link encap:Serial Line IP
           inet addr:192.168.60.15 P-t-P:172.18.48.169 Mask:255.255.255.255
           UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:10

route -n output:
Kernel IP routing table
 Destination Gateway Genmask Flags Metric Ref Use Iface
 172.18.48.169 172.18.48.169 255.255.255.255 UGH 0 0 0 sl0
 172.18.48.169 0.0.0.0 255.255.255.255 UH 1 0 0 sl0
 172.22.72.60 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
 172.22.72.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
 0.0.0.0 172.22.72.136 0.0.0.0 UG 0 0 0 eth0
 0.0.0.0 0.0.0.0 0.0.0.0 U 1 0 0 sl0

(I know I'd better upgrade this machine and use iptables but
 it's impossible, due to many bad reasons.)

Thanks for any input !

-- 
 TTK
-- 
Ce message a ete poste via la plateforme Web club-Internet.fr
This message has been posted by the Web platform club-Internet.fr
http://forums.club-internet.fr/


Relevant Pages

  • Re: networking a Pogolinux system
    ... I didn't install any firewall (this was within a safe network). ... xxx.xx.36.0/22 dev eth0 scope link ... > If there is no rule, then you should check route table. ...
    (comp.os.linux.networking)
  • Re: network issue
    ... The network is fine using DHCP and "automatically obtain DNS info from ... aa.aaa.aaa.0/24 dev vnic0 proto kernel scope link src aa.aaa.aaa.2 ... bbb.b.ccc.0/21 dev eth0 proto kernel scope link src bbb.b.eee.29 ...
    (Fedora)
  • setting up router
    ... I want to setup a router on a Fedora Linux machine. ... Subnet Mask 255.255.255.0 ... 181.196.188.0/24 dev eth0 scope link ... 10.10.10.0/24 dev eth1 proto kernel scope link src 10.10.10.254 ...
    (comp.os.linux.networking)
  • subnet to subnet routing question
    ... [root@circle root]$ ip route ... 192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.3 ... The only route that I have explicitly added above (ie, ...
    (comp.os.linux.networking)
  • Re: network issue
    ... The network is fine using DHCP and "automatically obtain DNS info from ... aa.aaa.aaa.0/24 dev vnic0 proto kernel scope link src aa.aaa.aaa.2 ... bbb.b.ccc.0/21 dev eth0 proto kernel scope link src bbb.b.eee.29 ...
    (Fedora)