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

    Hello.
    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

    Code:
    sleep 5
    ifconfig vlan2 192.168.3.1 netmask 255.255.255.0
    ifconfig vlan2 up
    ip addr add 192.168.1.3/24 dev vlan1 brd +
    gives your lan a second network and your wan a second ip.

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

    Code:
    nvram set manual_boot_nv=1
    nvram set vlan0ports="5* 3 2 1"
    vlan2hwname=et0
    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.

    michse
     

Share This Page