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

Accessing modem interface on TomatoUSB

Discussion in 'Tomato Firmware' started by jochen, Nov 29, 2010.

  1. jochen

    jochen LI Guru Member

    Hello,
    I replaced my WRT54GL with an Asus RT-16N and TomatoUSB.
    I had the following firewall script for accessing my modem:
    Code:
    iptables -I POSTROUTING -t nat -o vlan1 -d 192.168.0.0/24 -j MASQUERADE
    ip addr add 192.168.0.2/24 dev vlan1 brd +
    This does not work on my Asus and TomatoUSB.
    Do the interfaces have other names?
    What must be changed to work on the Asus?
     
  2. Toink

    Toink Network Guru Member

    Code:
    iptables -I POSTROUTING -t nat -o vlan1 -d 192.168.0.0/30 -j MASQUERADE
    ip addr add 192.168.0.2/30 dev [B][COLOR=red]vlan2[/COLOR][/B] brd +
    Try changing the vlan :)
     
  3. mstombs

    mstombs Network Guru Member

    If you use $(nvram get wan_ifname), the same script should work on all Tomato routers, or is it wan_iface - can't find the thread that discussed this right now...
     
  4. jochen

    jochen LI Guru Member

    Thank you very much. That solved my problem. It is vlan2 on the Asus.
     
  5. Mercjoe

    Mercjoe Network Guru Member

    What would be the correct script using the $(nvram get wan_ifname) syntax?

    I too just upgraded from a WRT54G w/Tomato to a WNR3500L w/TomatoUSB and the old script (which was just like his original) does not work for me.

    If this is something that would work for most cases, I wonder why it is not just included in the firmware. It would make it a lot easier.
     
  6. Toastman

    Toastman Super Moderator Staff Member Member

    init: ip addr add 192.168.0.13/24 dev $(nvram get wan_ifname) brd +
    (you may need a "sleep 5" line first to give a delay)

    This gives the WAN interface an IP so that we can use it to route.

    firewall: iptables -I POSTROUTING -t nat -o $(nvram get wan_ifname) -d 192.168.0.2/24 -j MASQUERADE

    We now route the modem's subnet out of the WAN port in addition to the PPPOE connection.

    http://www.linksysinfo.org/forums/showpost.php?p=338333&postcount=34
    http://www.linksysinfo.org/forums/showthread.php?t=63486
     
  7. Mercjoe

    Mercjoe Network Guru Member

    Worked like a champ.

    Why wouldn't the old generis way from the original Tomato not work with it?

    I am just curious what changed.
     
  8. occamsrazor

    occamsrazor Network Guru Member

    Code:
    init: ip addr add 192.168.0.13/24 dev $(nvram get wan_ifname) brd +
    (you may need a "sleep 5" line first to give a delay)
    
    firewall: iptables -I POSTROUTING -t nat -o $(nvram get wan_ifname) -d 192.168.0.0/24 -j MASQUERADE
    
    Sorry to be dumb but I'm unclear on the IP address syntax in the above code. My LAN is 192.168.0.xxx, my router is 192.168.0.1, and I'd like my modem to be accessible on 192.168.1.1 - what code should I use? Thanks...
     
  9. Toastman

    Toastman Super Moderator Staff Member Member

    init: ip addr add 192.168.1.13/24 dev $(nvram get wan_ifname) brd +
    (you may need a "sleep 5" line first to give a delay)

    This gives the WAN interface an IP so that we can use it to route.

    firewall: iptables -I POSTROUTING -t nat -o $(nvram get wan_ifname) -d 192.168.1.2/24 -j MASQUERADE

    We now route the modem's subnet out of the WAN port in addition to the PPPOE connection.
     
  10. Ronnie_USA

    Ronnie_USA Networkin' Nut Member

    My modem address is at 192.168.100.1, and my E3000 is using 192.168.1.1, and I also can no longer get to the web interface of my modem.

    Could you also help me to Please?

    Thank You
     
  11. occamsrazor

    occamsrazor Network Guru Member

    Sorry for the delay in getting back, this is working nicely, thanks....
     
  12. CBR900

    CBR900 LI Guru Member

    Can you help editing these lines for

    My modem ip= 10.0.0.138
    Router ip= 192.168.1.1

    please
     
  13. lifeisfun

    lifeisfun LI Guru Member

    I would appreciate if someone can help me as well,
    my modem IP is 192.168.2.1
    Asus RT-N16 router 192.168.1.1 (Latest Tomato firmware installed)
    These lines work well to access the modem:
    Init:
    sleep 5
    ip addr add 192.168.2.0/24 dev $(nvram get wan_ifname) brd +

    firewall:
    iptables -I POSTROUTING -t nat -o $(nvram get wan_ifname) -d 192.168.1.0/24 -j MASQUER

    but it stops my Sipura ATA from registerin my Voip account
    SPA2102 IP 192.168.236

    Can you please hive me hint what I'm doing wrong?

    Thanks
     
  14. Toastman

    Toastman Super Moderator Staff Member Member

  15. lifeisfun

    lifeisfun LI Guru Member

    Thanks so much for reply!
    can I just back up my existing configuration and restore it after the firmware upgrade?

    Thanks
     
  16. Toastman

    Toastman Super Moderator Staff Member Member

  17. lifeisfun

    lifeisfun LI Guru Member

    Thanks for your help and patience!
     
  18. lifeisfun

    lifeisfun LI Guru Member

    I'm stuck again :(
    I did understand how to choose the proper version ( features) but I'm unclear
    if I should get the E2000 E3000 or E4200 version for my RT-N16

    Thanks
     
  19. Toastman

    Toastman Super Moderator Staff Member Member

  20. lifeisfun

    lifeisfun LI Guru Member

    After the FW upgrade it's working!
    Thanks for all the work you put int to the FW development Toastman!
     
  21. ferdii

    ferdii Networkin' Nut Member

    First time poster here.

    Just wanted to confirm that I have just completed installation of Toastman Tomato 7493 on my E3000 and have successfully used this feature to access my modem. Great feature.

    Ferdinand
     

Share This Page