Create a second aislated wifi network with two router config

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Author Message
Ork77
DD-WRT Novice


Joined: 02 Dec 2023
Posts: 3

PostPosted: Sat Dec 02, 2023 14:58    Post subject: Create a second aislated wifi network with two router config Reply with quote
Good day everyone.
I write to you from a deep state of desperation.Confused
I find myself needing to activate a guest network. Unfortunately, although we are almost in 2024, my internet provider gives routers that are not capable of creating a banal guest network. I was thus forced to buy a new router to go alongside this one and in order not to complicate my life I looked for something that could do this thing alone without too many problems and I got a tp-link ax55. Unfortunately today, after spending hours with TP link support, I hear that this router cannot do what it promised. Having no intention of wasting any more money, I went to recover an old router I had, a Tp-link wdr3600 on which I installed the latest available version of ddwrt. Unfortunately my problems are not over and despite the immense potential of this system I still cannot do what I need (and this time certainly due to my personal inability undoubtedly in the field of computer networks)
Let me start by saying that I have already read everything I found and made countless attempts without success. I can't find a single updated guide that is suitable for a total novice on the subject like me. Finding a good soul here is truly my last hope.

I'll give you my general configuration.
Router 1...not very configurable and not replaceable, several PCs are connected to it via cable. Possibly I will also use it to create the home WiFi network

Router 2, the wdr3600. This should be connected to the main one via cable (it is currently in gateway mode and connected via WAN port), I would use one of its LAN ports for a final PC and its network interfaces (both 2.4 and 5 gigabytes) to create the network guests. The guest network must be able to connect to the internet without limits but must absolutely not see, ping, connect etc etc with everything present in the main network. All my attempts so far have not achieved this result. Even with distinct subnets, putting ad hoc iptables rules, with ap and net isolation, blacklisting the mac addresses of the PCs on the main network, even with all this together I can't prevent a guest from seeing my PC or my plex server or anything else.
By now I've lost count of the resets but I don't know what else to try anymore. Could someone help me or direct me to some up-to-date and simple online resources to do what I want?
Thank you
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12923
Location: Netherlands

PostPosted: Sat Dec 02, 2023 15:13    Post subject: Reply with quote
Latest DDWRT can mean a lot of things, latest is of today 54248

To prevent a downstream router to see upstream network a simple iptables rules should suffice:
Code:
iptables -I FORWARD -d $(nvram get wan_ipaddr)/$(nvram get wan_netmask) -m state --state NEW -j REJECT

If you have more upstream networks you can use:
Code:
iptables -I FORWARD -d 192.168.0.0/16 -m state --state NEW -j REJECT
iptables -I FORWARD -d 172.16.0.0/12 -m state --state NEW -j REJECT
iptables -I FORWARD -d 10.0.0.0/8 -m state --state NEW -j REJECT


Test from command line and if it works: Administration > Commands, Save as Firewall

_________________
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
Ork77
DD-WRT Novice


Joined: 02 Dec 2023
Posts: 3

PostPosted: Sat Dec 02, 2023 19:19    Post subject: Reply with quote
OHMYGOD....For me you really are a guru Smile
Thank you..the first command did the trick!
Now there is just a minor thing to fix. The pc I connect to the ddwrt router gets his ip from it and the ip is 192.168.1.X (the main network and the wan are 192.168.0.x). Now...is there a way to force it to take an ip as all the others? Should I disable the dhc on the secondary router? (I guess no because probably will disable also the ones that provide ips for the wlan0/1 ). Or maybe should I just give it a static IP?
Thx
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12923
Location: Netherlands

PostPosted: Sat Dec 02, 2023 19:30    Post subject: Reply with quote
If you want the PC wired connected to the downstream router be part of the upstream network you can add the routers lan port to which that PC is connected to vlan2 instead of vlan1.

You can do that very simple on the Switch config tab although I am not sure your router has one.

Be warned that your PC can either be part of just one router.

_________________
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
Ork77
DD-WRT Novice


Joined: 02 Dec 2023
Posts: 3

PostPosted: Sat Dec 02, 2023 21:26    Post subject: Reply with quote
I have that..and it worked again.. and you really saved my day.

THANK YOU! Smile Very Happy Very Happy Very Happy
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware 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