Block LAN users to access WAN subnet

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
frodo28
DD-WRT Novice


Joined: 22 Apr 2013
Posts: 1

PostPosted: Fri May 04, 2018 8:59    Post subject: Block LAN users to access WAN subnet Reply with quote
I've a DSL router in the 192.168.1.0/24 subnet connected to the WAN port of the DD-WRT switch.
DD-WRT switch has on WLAN and LAN ports a 192.168.2.0/24 subnet configured.

I'd like to avoid a 192.168.2.X client to be able to access a 192.168.1.X client (TCP, ICMP, etc.).
On the other hand, a 192.168.1.X client should be able to access 192.168.2.X clients.

Which is the best way to get it?
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12917
Location: Netherlands

PostPosted: Fri May 04, 2018 10:35    Post subject: Reply with quote
To isolate your upstream network i.e. router you can add the following line to the firewall of your downstream router (Administration/Commands save firewall):

Code:
iptables -I FORWARD -d `nvram get wan_ipaddr`/`nvram get wan_netmask` -m state --state NEW -j REJECT


I have not tested it so I am not 100% sure but others will surely correct me Smile

To link the upstream network to your downstream network you have to set a static route from upstream to downstream and tweak the firewall of the downstream router.
Attached my notes to set this up, you have to substitute your own subnets

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum