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

1 WAN, 2 LAN's ?

Discussion in 'Tomato Firmware' started by likudio, Dec 7, 2009.

  1. likudio

    likudio Addicted to LI Member

    I would like to know if with Tomato Firmware (or any other WRT54GL firmware) I can create 2 internal LAN networks, one in ROUTER mode, and one in GATEWAY mode. If it's posible, I really need to know how, because I don't want to buy a new router. Thank you.
  2. michse

    michse Addicted to LI Member

    Hi, yes this should be go.

    I think a mix of vlan tuning and modem connection...

    init script

    sleep 5
    ifconfig vlan2 netmask
    ifconfig vlan2 up
    ip addr add dev vlan1 brd +
    gives your lan a second network and your wan a second ip.

    in firewallscript
    iptables -I POSTROUTING -t nat -o vlan1 -d -j MASQUERADE
    lets traffic pass to net on wan

    nvram set manual_boot_nv=1
    nvram set vlan0ports="5* 3 2 1"
    vlan2ports="5* 0"
    nvram commit
    separates port 0 to vlan2. so you have 2 lans and one wan in gateway and one in router mode. some firewallrules may be nessessary.


Share This Page