Virtual Wifi with alternative gateway

Discussion in 'Tomato Firmware' started by kellyjelly, Oct 30, 2013.

  1. kellyjelly

    kellyjelly Reformed Router Member


    have normal Wifi, all good, br0 at subnet, DHCP active

    made a wl0.1, bridged to br1, subnet, no DHCP
    to Advanced/DHCP/custom DNSmasq, works fine, getting IP on wl0.1 with Gateway being, but no internet! Ping to br0 ..68.0 timeouts! ping to br1 ..77.0 is okay! Tried
    iptables -A FORWARD -i br0 -o br1 -s -d -j ACCEPT
    iptables -A FORWARD -i br1 -o br0 -s -d -j ACCEPT
    Firewall rule, not working

    iptables -I FORWARD -i br1 -o br0 -m state --state NEW -j ACCEPT
    iptables -I FORWARD -i br0 -o br1 -m state --state NEW -j ACCEPT
    iptables -I INPUT -i br1 -m state --state NEW -j ACCEPT
    not working too (tried "iptables -A" too with those commands), rebootet several times and checked if rules are applied in SSH with iptables --list

    [[Purpose: ...254 is an other gateway (RaspberryPi), tunneling thru VPN, Being on br0 and setting ..68.254 as Gateway works fine, result is being tunneled, great! Would be nice to have a 2nd virtual Wifi which is tunneled]]

    Best would be if i just could use br0 for both eth0 and wl0.1 but how could I assign other gateway for devices connecting thru wl0.1?
  2. kellyjelly

    kellyjelly Reformed Router Member

    Now switched to a Software Solution on the Clients, which can switch quickly between different IP profiles (DHCP or static address+gateway). Made static DHCP reservations for clients, so they always have same IP, just gatway alters depending to profile used. Software is "TCP/IP Manager", quick access thru taskbar.

    But would like to know solution for future reference.
  3. jerrm

    jerrm Network Guru Member

    Basic networking. The gateway has to be on the same subnet as the client. Having a .68.x gateway for a .77.x subnet will never work.
    kellyjelly likes this.
  4. kellyjelly

    kellyjelly Reformed Router Member

    What about ditching br1 completly and put wl0.1 on br0, but somehow tell DNSmasq to issue ...254 as gateway for all DHCP requests in wl0.1? Something like
    Problem is that
    somehow overrides my specifications for wl0.1 as it is part of br0. "interface=br0" comes first in /etc/dnsmasq.conf The custom config is appended to the file. Every time DNSmasq starts/restarts /etc/dnsmasq.conf is reset, so changing order does not work. Does DNSmasq even accept "interface=wl0.1" ?
  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