Networking – Two subnets block traffic between them but allow internet

networkingroutersubnetwireless-networking

I have 192.168.1.1/24 network that has a switch and several access points .There is a adsl modem at 192.168.1.1 .
I want to add a new network 192.168.2.1/24 with its own access point and switch.

so far everything is fine

Problem i am struggling to solve one week is how to let 192.168.2.1/24 and 192.168.2.1/24 share internet (and have separate DHCP and block traffic between there subnets)?

Double nating is a solution but i want to avoid it.

I have a spare routerboard RB750 that has router/firewall some vlan support.

So what would be a solution for this problem ? So far maybe with a firewall rule i could block 1.1/24 to 2.1/24 traffic but how should i setup internet to work ??
Somehow traffic should be routed at modem in case it doenst match local subnet…
Any solution ?

Best Answer

Using the setup at the link you provided, just delete/disable the route(s) between the networks you don't want communicating with each other and they won't be able to reach each other. As long as the nets are masqueraded in your NAT rules, they'll still get to the Internet.

Related Question