Guest Network - most secure config

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


Joined: 09 Feb 2017
Posts: 36

PostPosted: Thu Jul 16, 2020 13:48    Post subject: Guest Network - most secure config Reply with quote
I've been trying to set up a virtual guest network in a secure way following guides around creating bridges etc. but whenever I do so I an no longer connect via the guest virtual network.

Currently on DD-WRT v3.0-r43516 std (06/25/20)

Any help would be appreciated
Sponsor
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14247
Location: Texas, USA

PostPosted: Thu Jul 16, 2020 14:30    Post subject: Reply with quote
Bridged vaps on Broadcom require startup script commands workaround. This is well-documented in the forum.

• VAPs not working at boot fixed for unbridged VAPs with r40564:40566. Workaround startup command examples:

Code:
sleep 10;stopservice nas;stopservice wlconf;startservice wlconf;startservice nas

Code:
sleep 10;stopservice nas;wlconf eth1 down;wlconf eth1 up;wlconf eth2 down;wlconf eth2 up;startservice nas

Code:
stopservice lan;
startservice lan;
wlconf eth1 down;
wlconf eth2 down;
wlconf eth1 up;
wlconf eth2 up;

Code:
sleep 20
nvram set wl1.1_hwaddr=
nvram commit
stopservice nas; wlconf eth1 down; wlconf eth2 down; wlconf eth1 up; wlconf eth2 up; startservice nas; logger "VAP workaround executed";

Code:
sleep 1
logger "VAP workaround starting";
nvram set wl1.1_hwaddr=
nvram commit
stopservice nas; wlconf eth1 down; wlconf eth2 down; wlconf eth1 up; wlconf eth2 up; startservice nas; logger "VAP workaround executed";

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
eibgrad
DD-WRT Guru


Joined: 18 Sep 2010
Posts: 9157

PostPosted: Thu Jul 16, 2020 19:24    Post subject: Reply with quote
In general, I *do* recommend that you use bridges when creating virtual wireless connections. It just makes it easier to deal w/ situations where eventually you decide to bridge it w/ other physical/virtual wireless connections or wired connections (e.g., you don't have to rewrite the firewall rules). But if you don't anticipate that ever happening, it's not strictly necessary. You can just reference the virtual network interface directly and keep it simple.

IOW, the use of bridges is NOT inherently more safe/security than referencing the actual network interfaces. It's more a matter of convenience than anything else.

_________________
ddwrt-ovpn-split-basic.sh (UPDATED!) * ddwrt-ovpn-split-advanced.sh (UPDATED!) * ddwrt-ovpn-client-killswitch.sh * ddwrt-ovpn-client-watchdog.sh * ddwrt-ovpn-remote-access.sh * ddwrt-ovpn-client-backup.sh * ddwrt-mount-usb-drives.sh * ddwrt-blacklist-domains.sh * ddwrt-wol-port-forward.sh * ddwrt-dns-monitor.sh (NEW!)
Carldean84
DD-WRT Novice


Joined: 09 Feb 2017
Posts: 36

PostPosted: Fri Jul 17, 2020 17:50    Post subject: Reply with quote
eibgrad wrote:


IOW, the use of bridges is NOT inherently more safe/security than referencing the actual network interfaces. It's more a matter of convenience than anything else.


So simply setting up a virtual network is safe enough?
I'm wanting to use it for smart devices and the kid's tablet and mobile. basically any device I don't completely trust not be vulnerable at some point due.

If so then I can move on to attempting to tackle the task of limiting bandwidth for the virtual guest network so I'm getting more juice down the line for streaming etc.
eibgrad
DD-WRT Guru


Joined: 18 Sep 2010
Posts: 9157

PostPosted: Fri Jul 17, 2020 18:35    Post subject: Reply with quote
As I read your post, it sounded to me as if you had the impression that assigning your virtual wireless network to a bridge was somehow going to make things more secure. IT DOES NOT! Whether you reference the virtual wireless network interface directly (e.g., wl0.1), or assign it to a new bridge (e.g., br1) and reference that instead, it's all the same as far as security is concerned. In either case, you need to create firewall rules that reference one or the other.

What a bridge does is add convenience. For example, suppose I have *multiple* virtual wireless interfaces or even want to add a wired network interface such that they are all configured w/ the same IP network. I can add them all to their own bridge and reference only it (e.g., in creating firewall rules) rather than dealing w/ the individual network interfaces.

Again, there is no security benefit here. And that's why sometimes, esp. in simple configurations, such as adding a virtual wireless network for guests, users will forgo a bridge and just create firewall rules based on that network interface (e.g., wl0.1).

Code:
# no communications between private and guest networks
iptables -I FORWARD -i br0 -o wl0.1 -j REJECT
iptables -I FORWARD -i wl0.1 -o br0 -j REJECT


But if you choose to assign that wireless network interface to a bridge (e.g., br1), all that does is change your references in the same firewall rules.

Code:
# no communications between private and guest networks
iptables -I FORWARD -i br0 -o br1 -j REJECT
iptables -I FORWARD -i br1 -o br0 -j REJECT


Six of one and half-dozen of the other (from a security perspective).

_________________
ddwrt-ovpn-split-basic.sh (UPDATED!) * ddwrt-ovpn-split-advanced.sh (UPDATED!) * ddwrt-ovpn-client-killswitch.sh * ddwrt-ovpn-client-watchdog.sh * ddwrt-ovpn-remote-access.sh * ddwrt-ovpn-client-backup.sh * ddwrt-mount-usb-drives.sh * ddwrt-blacklist-domains.sh * ddwrt-wol-port-forward.sh * ddwrt-dns-monitor.sh (NEW!)
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12917
Location: Netherlands

PostPosted: Fri Jul 17, 2020 19:29    Post subject: Reply with quote
Attached my personal notes how I do it for setting up a simple VAP

If you enable NET isolation the unbridged VAP is isolated from the router and from br0

_________________
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
eibgrad
DD-WRT Guru


Joined: 18 Sep 2010
Posts: 9157

PostPosted: Fri Jul 17, 2020 19:57    Post subject: Reply with quote
Thanks for the clarification egc.

Yes, I had always assumed that depending on whether you configured the virtual wireless network interface as bridged or unabridged, Net Isolation would ultimately create one or the other set of rules as I described above. My manual firewall rules are more to make clear what's happening, and using the Net Isolation option to obtain the same effect is probably preferred.

But as you know, I'm old school. And I don't fully trust those additional settings, particularly when dealing w/ any non-routed configuration (e.g., WAP). If you decide to configure a WAP, then add a virtual wireless network interface for guests, those auto-generated rules are worthless since you can't deny access from the guest network through the private network and still gain internet access.

That's why there are always caveats to using the GUI. The GUI works in *most* cases for typical configurations (usually routed). But as we all know, it's commonplace around here for ppl to create all kinds of configurations in which the GUI will fail you because of its assumptions. Just keep that in mind.

_________________
ddwrt-ovpn-split-basic.sh (UPDATED!) * ddwrt-ovpn-split-advanced.sh (UPDATED!) * ddwrt-ovpn-client-killswitch.sh * ddwrt-ovpn-client-watchdog.sh * ddwrt-ovpn-remote-access.sh * ddwrt-ovpn-client-backup.sh * ddwrt-mount-usb-drives.sh * ddwrt-blacklist-domains.sh * ddwrt-wol-port-forward.sh * ddwrt-dns-monitor.sh (NEW!)
Carldean84
DD-WRT Novice


Joined: 09 Feb 2017
Posts: 36

PostPosted: Sat Jul 18, 2020 7:38    Post subject: Reply with quote
egc wrote:
Attached my personal notes how I do it for setting up a simple VAP

If you enable NET isolation the unbridged VAP is isolated from the router and from br0


Thanks for the etc. I followed your guide for unbridged VAP setup using @Redhawks startup script and now have a fully working VAP Very Happy
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12917
Location: Netherlands

PostPosted: Sat Jul 18, 2020 8:21    Post subject: Reply with quote
eibgrad wrote:
Thanks for the clarification egc.

Yes, I had always assumed that depending on whether you configured the virtual wireless network interface as bridged or unabridged, Net Isolation would ultimately create one or the other set of rules as I described above. My manual firewall rules are more to make clear what's happening, and using the Net Isolation option to obtain the same effect is probably preferred.

But as you know, I'm old school. And I don't fully trust those additional settings, particularly when dealing w/ any non-routed configuration (e.g., WAP). If you decide to configure a WAP, then add a virtual wireless network interface for guests, those auto-generated rules are worthless since you can't deny access from the guest network through the private network and still gain internet access.

That's why there are always caveats to using the GUI. The GUI works in *most* cases for typical configurations (usually routed). But as we all know, it's commonplace around here for ppl to create all kinds of configurations in which the GUI will fail you because of its assumptions. Just keep that in mind.


Old school is the way I like it too Smile

But indeed the GUI works only in simple cases like the OP is stating.

_________________
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