Fresh Tomato can't reach modem GUI

Discussion in 'Tomato Firmware' started by kasper1985, Jun 12, 2018.

  1. kasper1985

    kasper1985 New Member Member

    Hi,

    I am using fresh tomato on a asus RT-AC56U to setup a pppoe connection. As a modem i use a modified fritzbox 7581 that has been modified (through the config file) to act as a dumb modem.

    I have filled in the modem's IP (192.168.178.1) in the "route modem IP" in the GUI. I am still not able to ping or access the modem's gui from any machine connected to the asus.

    My ISP recquires to have VLAN6 tagged for the internet (and uses other VLAN's for TV etc) and i noticed the interface VLAN6 has IP 192.168.178.2 when the "route modem IP" is used. There is also a route added to the kernel's routing table when i use this option.

    I think tomato is confused because of the use of the VLAN and the ip should be removed from vlan 6 interface and added to eth0 (WAN interface) but i haven't been able to figure out how i do this. When i try to do this through the CLI i get thrown at by error messages.

    Can someone tell me how to make the changes that i think will fix the issue? Or another way (through the GUI) to fix this?
     
  2. eibgrad

    eibgrad Network Guru Member

    Clear the "Route modem IP" field.

    Add the following to the init script.

    Code:
    WAN_IF="$(ip route | awk '/^default/{print $NF}')"
    ifconfig $WAN_IF:1 192.168.178.2 netmask 255.255.255.0 broadcast 192.168.178.255
    Add the following to the firewall script.

    Code:
    iptables -t nat -I POSTROUTING -d 192.168.178.0/24 -j SNAT --to 192.168.178.2
    Reboot.
     
    Combat619 likes this.
  3. kasper1985

    kasper1985 New Member Member

    @elbgrad Thank you for your reply!

    I have added the lines to the script as you said. Unfortunately no joy. I still can't ping the modem from the Asus's CLI or any machine on the LAN behind the Asus.
     
  4. eibgrad

    eibgrad Network Guru Member

    Dump the following relevant data structures and let's see if they even got applied.

    Code:
    ifconfig
    iptables -t nat -vnL POSTROUTING
     
  5. kasper1985

    kasper1985 New Member Member

    Below the output from these commands

    Code:
    root@unknown:/tmp/home/root# ifconfig
    br0        Link encap:Ethernet  HWaddr AC:22:0B:1F:39:10
               inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
               inet6 addr: 2001:980:b6ef:0:ae22:bff:fe1f:3910/64 Scope:Global
               inet6 addr: fdbc:fc5f:1cd2:0:ae22:bff:fe1f:3910/64 Scope:Global
               inet6 addr: fe80::ae22:bff:fe1f:3910/64 Scope:Link
               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
               RX packets:52508037 errors:0 dropped:0 overruns:0 frame:0
               TX packets:101151157 errors:0 dropped:0 overruns:0 carrier:0
               collisions:0 txqueuelen:0
               RX bytes:4152771638 (3.8 GiB)  TX bytes:151372837041 (140.9 GiB)
    
    br1        Link encap:Ethernet  HWaddr D6:D0:17:7E:74:8E
               inet addr:172.16.0.1  Bcast:172.16.0.255  Mask:255.255.255.0
               inet6 addr: fe80::d4d0:17ff:fe7e:748e/64 Scope:Link
               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
               RX packets:0 errors:0 dropped:0 overruns:0 frame:0
               TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
               collisions:0 txqueuelen:0
               RX bytes:0 (0.0 B)  TX bytes:1988 (1.9 KiB)
    
    eth0       Link encap:Ethernet  HWaddr AC:22:0B:1F:39:10
               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
               RX packets:175673865 errors:0 dropped:0 overruns:0 frame:0
               TX packets:153515207 errors:0 dropped:0 overruns:0 carrier:0
               collisions:0 txqueuelen:1000
               RX bytes:3605832701 (3.3 GiB)  TX bytes:2654052417 (2.4 GiB)
               Interrupt:179 Base address:0x4000
    
    eth1       Link encap:Ethernet  HWaddr AC:22:0B:1F:39:10
               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
               RX packets:0 errors:0 dropped:0 overruns:0 frame:5373112
               TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
               collisions:0 txqueuelen:1000
               RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
               Interrupt:163
    
    eth2       Link encap:Ethernet  HWaddr AC:22:0B:1F:39:14
               inet6 addr: fe80::ae22:bff:fe1f:3914/64 Scope:Link
               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
               RX packets:0 errors:0 dropped:0 overruns:0 frame:5489
               TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
               collisions:0 txqueuelen:1000
               RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
               Interrupt:169
    
    lo         Link encap:Local Loopback
               inet addr:127.0.0.1  Mask:255.0.0.0
               inet6 addr: ::1/128 Scope:Host
               UP LOOPBACK RUNNING MULTICAST  MTU:65536  Metric:1
               RX packets:1610 errors:0 dropped:0 overruns:0 frame:0
               TX packets:1610 errors:0 dropped:0 overruns:0 carrier:0
               collisions:0 txqueuelen:0
               RX bytes:154176 (150.5 KiB)  TX bytes:154176 (150.5 KiB)
    
    ppp0       Link encap:Point-to-Point Protocol
               inet addr:80.101.51.124  P-t-P:194.109.5.177  Mask:255.255.255.255
               inet6 addr: fe80::f16c:ab25:cf79:2774/10 Scope:Link
               UP POINTOPOINT RUNNING MULTICAST  MTU:1492  Metric:1
               RX packets:101094878 errors:0 dropped:0 overruns:0 frame:0
               TX packets:52359106 errors:0 dropped:0 overruns:0 carrier:0
               collisions:0 txqueuelen:3
               RX bytes:3917024638 (3.6 GiB)  TX bytes:4133813965 (3.8 GiB)
    
    vlan1      Link encap:Ethernet  HWaddr AC:22:0B:1F:39:10
               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
               RX packets:52521029 errors:0 dropped:0 overruns:0 frame:0
               TX packets:101152484 errors:0 dropped:0 overruns:0 carrier:0
               collisions:0 txqueuelen:0
               RX bytes:4365836440 (4.0 GiB)  TX bytes:151777534535 (141.3 GiB)
    
    vlan6      Link encap:Ethernet  HWaddr AC:22:0B:1F:39:11
               inet6 addr: fe80::ae22:bff:fe1f:3911/64 Scope:Link
               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
               RX packets:101112860 errors:0 dropped:0 overruns:0 frame:0
               TX packets:52362723 errors:0 dropped:0 overruns:0 carrier:0
               collisions:0 txqueuelen:0
               RX bytes:151163427700 (140.7 GiB)  TX bytes:5495340538 (5.1 GiB)
    
    Code:
    root@unknown:/tmp/home/root# iptables -t nat -vnL POSTROUTING
    Chain POSTROUTING (policy ACCEPT 1570 packets, 613K bytes)
     pkts bytes target     prot opt in     out     source               destination
      197 12389 SNAT       all  --  *      *       0.0.0.0/0            192.168.178.0/24     to:192.168.178.2
    23604 1671K MASQUERADE  all  --  *      ppp0    0.0.0.0/0            0.0.0.0/0
     1457  570K SNAT       all  --  *      br0     192.168.1.0/24       192.168.1.0/24       to:192.168.1.1
        0     0 SNAT       all  --  *      br1     172.16.0.0/24        172.16.0.0/24        to:172.16.0.1
    
     
  6. eibgrad

    eibgrad Network Guru Member

    I think I see what happened here. My mistake was to not wait for the WAN to come up. So the following command ...

    Code:
    WAN_IF="$(ip route | awk '/^default/{print $NF}')"
    ... never picked up the proper network interface, hence the attempt to multihome the WAN failed.

    Move the script to the wanup script and see if it helps.

    Leave the firewall rule in place, as is.
     
  7. eibgrad

    eibgrad Network Guru Member

    P.S. In fact, since we now know the network interface name, you could just simply eliminate the WAN_IF command and reference and hardcode it.

    Code:
    ifconfig ppp0:1 192.168.178.2 netmask 255.255.255.0 broadcast 192.168.178.255
     
  8. ruggerof

    ruggerof Network Guru Member

    Are you sure you were able to bridge the fritzbox? I tried so many times to bridge the several (pieces of junk) fritzboxes I have without success.
     
  9. kasper1985

    kasper1985 New Member Member

    Hi ruggerof,

    Yes i bridged the fritzbox. I have written a manual here:
    http://kknaack.home.xs4all.nl/

    It's in Dutch but you can probably get the most important steps clear by running it through google translate.

    eibgrad: Thank you! I will try this right now. Sorry for the late response i very much appreciate your input and help but i was helping someone to move house so wasn't able to respond earlier.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice