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

Can't access to modem.

Discussion in 'Tomato Firmware' started by hakowy, Nov 23, 2011.

  1. hakowy

    hakowy Networkin' Nut Member

    Hello, i have modem(tp-link 8816) ip 192.168.2.1, dhcp off, bridge on.

    I set:
    FIREWALL:
    sleep 5
    ip addr add 192.168.2.1/24 dev $(nvram get wan_ifname) brd +
    iptables -I POSTROUTING -t nat -o $(nvram get wan_ifname) -d 192.168.2.0/24 -j MASQUERADE
    iptables -A FORWARD -i $(nvram get lan_ifname) -o $(nvram get wan_ifname) -j ACCEPT

    clicked save and still i cant access to modem, also in routing i dont see new network(192.168.2.0), what is wrong?
    I also dont see, that new network 192.168.2.0 has been created in advanced/routing section
     
  2. kthaddock

    kthaddock Network Guru Member

    Do have same ip to your moden and router ?
     
  3. hakowy

    hakowy Networkin' Nut Member

    No, different, Router ip is 192.168.1.1
     
  4. Mercjoe

    Mercjoe Network Guru Member

    Presuming that you have the router as a base IP of 192.168.2.1 and the modem control panel is reached at 192.168.1.1

    Then try this in the scripts section.....

    INIT:
    sleep 5
    ip addr add 192.168.1.10/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 MASQUERADE
    iptables -A FORWARD -i $(nvram get lan_ifname) -o $(nvram get wan_ifname) -j ACCEPT <------ this is only nessecary if you are running a VLAN GUI build!

    ----------------------------------------------------------------
    This is how I access my DSL modem and it works perfectly provided the above presumptions are correct.

    You will find that most modems, when set to bridge mode, default to 192.168.1.x for access to the control panel regardless of what you tell it to do.
     
  5. hakowy

    hakowy Networkin' Nut Member

    my modem is 192.168.2.1 ,and router is 192.168.1.1 , anyway it still doesnt work.

    I'm using this version of tomato tomato-K26USB-1.28.905xRAF-EN-MIPSR2-079V-BT-VPN

    Hmm should i reset router after write those values in script, or just click save button(i clicked save button)?
     
  6. hakowy

    hakowy Networkin' Nut Member

    FINALLY i got access to my modem!! But i had probably to reset this modem/or to wait some time, have used same values as in post above.
     
  7. Mercjoe

    Mercjoe Network Guru Member

    Sorry, I should have added that you have to reboot the router once you made the changes. None of the scripts take effect unless you reboot the router or call them manually. Well, except the WAN UP script. I believe that one is called whenever the WAN resets.
     

Share This Page