1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Modem is lost from routing table WHY?

Discussion in 'Tomato Firmware' started by Beast, Jun 20, 2011.

  1. Beast

    Beast Network Guru Member

    HI

    Im using K26USB-1.28.7821MIPSR1-Toastman-ND-VPN on a WRTSL54GS which lives at 192.168.1.1 and the modem at 192.168.0.1

    After adding the proper lines in the Script section INIT ( ip addr add 192.168.0.2/24 dev eth1 brd + ) and FIREWALL ( /usr/sbin/iptables -I POSTROUTING -t nat -o eth1 -d 192.168.0.0/24 -j MASQUERADE ).

    All works fine after a reboot. But after some time of running, not sur how long. Address 192.168.0.0 * 255.255.255.0 0 eth1 (MAN) just dissapears from the routeing table.

    Toastman any idea why.

    Beast
     
  2. roadkill

    roadkill Super Moderator Staff Member Member

    that rule is being rewritten when the modem is dialed, I think that if you'll use it in wanup it'll be fine.
     
  3. Beast

    Beast Network Guru Member

    Well put (/usr/sbin/iptables -I POSTROUTING -t nat -o eth1 -d 192.168.0.0/24 -j MASQUERADE) in wanup and still drops modem from route.

    Do I need to put both lines in wanup ???
     
  4. drizzle

    drizzle Networkin' Nut Member

    I think he means to move the "ip addr add ..." from the Init page to Wan Up page.
    Leave "iptables .." in Firewall. So each time a 'wan up' happens from the modem, you will issue 'ip addr add ..' again.

    or if you want a single command that survives Wan Up events from your modem, you can try changing - Init "ip addr add .." to
    Init "ifconfig $(nvram get wan_iface):1 192.168.0.2"
     

Share This Page