[SOLVED] R7000 unbridged wireless no internet, DHCP works

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
Encephala
DD-WRT Novice


Joined: 02 Oct 2022
Posts: 6

PostPosted: Sun Oct 02, 2022 8:55    Post subject: [SOLVED] R7000 unbridged wireless no internet, DHCP works Reply with quote
Router: Netgear R7000
Firmware: v3.0-r50308
Kernel: Linux 4.4.302

I am trying to isolate a switch (unmanaged, Sitecom LN 120 v1 002) into a vLAN, as it has a NAS on it (at 10.0.50.10) that I want to be able to access from my own PC (also in the switch) but from no other devices. Setting up the switch in vlan3 gave me trouble, so I set up the switch in vlan1 on port 1, and moved ports 2 through 4 to vlan3. Everything works perfectly so far.

However, isolating the wireless gives me trouble. I did the following:

  • Create a bridge br1, STP on (should it be?) and subnet 10.0.52.0/24
  • Add the wireless interfaces eth1 and eth2 to the bridge, as well as the guest network wl0.1 (with AP isolation on, the guest network is still isolated from devices on the default interfaces right?)
  • Enable DHCP for the bridge
  • Open up some communication on the firewall as below

Code:
# Block all communication between vlans except for vlan# - vlan2 (WAN vlan)
iptables -I FORWARD -i vlan+ -o vlan+ -j DROP
iptables -I FORWARD -i vlan+ -o vlan2 -j ACCEPT
iptables -I FORWARD -i vlan2 -o vlan+ -j ACCEPT
# Allow everyone to access NAS and allow local devices to access configuration
iptables -I FORWARD -d 10.0.50.10/32 -p tcp -m multiport --dports 80,443,6690 -j ACCEPT
iptables -I FORWARD -d 10.0.50.10/32 -s 10.0.0.0/16 -p tcp -m multiport --dports 5000,5001 -j ACCEPT


EDIT: For the record, if I don't move my wireless interfaces from br0 to br1, internet connection works perfectly. I also don't have any connection issues over ethernet.

Now if I connect to the wireless on my Windows 11 PC, it says it can't connect, and if I try on my Android 13 phone, it says "Connected to device, can't provide internet", but I can verify that my phone gets an IP in the 10.0.52.0/24 subnet. I assume I'm missing some firewall rules to allow the bridge to communicate to the outside world, but I've tried the rules provided here for allowing "br1 to access br0, the WAN and any other subnets" (not the functionality I'd want, but at least getting internet would be the starting point for me), but my phone responde with the same behaviour.

What am I missing? I've tried to go through the instructions at https://wiki.dd-wrt.com/wiki/index.php/Switched_Ports, and that gave me the idea that my issue may be that br1 isn't connected to the WAN vlan2, but this guide only talks about vlans, not wlans, and I don't know how to extend that information to wlans.
If I'm missing iptables rules, what rules would I need? I'm very unfamiliar with iptables and quite new to networking in general, so any help would be much appreciated!

Attached some screenshots of my Wireless settings, my Bridge setup and the DHCP settings. Below you can find the outputs of iptables -t nat -vnL PREROUTING and iptables -vnL FORWARD.

Code:
iptables -t nat -vnL PREROUTING
Chain PREROUTING (policy ACCEPT 846 packets, 160K bytes)
 pkts bytes target     prot opt in     out     source               destination         
    1    36 DNAT       icmp --  *      *       0.0.0.0/0            <my public IP>        to:10.0.50.1
    0     0 DNAT       tcp  --  *      *       0.0.0.0/0            <my public IP>        tcp dpt:80 to:10.0.50.10:80
    6   284 DNAT       tcp  --  *      *       0.0.0.0/0            <my public IP>        tcp dpt:443 to:10.0.50.10:443
    0     0 DNAT       tcp  --  *      *       0.0.0.0/0            <my public IP>        tcp dpt:6690 to:10.0.50.10:6690
  104 18934 TRIGGER    all  --  *      *       0.0.0.0/0            <my public IP>       TRIGGER type:dnat match:0 relate:0


Code:
iptables -vnL FORWARD
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     tcp  --  *      *       10.0.0.0/16          10.0.50.10           multiport dports 5000,5001
   18  1261 ACCEPT     tcp  --  *      *       0.0.0.0/0            10.0.50.10           multiport dports 80,443,6690
    3   240 ACCEPT     all  --  vlan2  vlan+   0.0.0.0/0            0.0.0.0/0           
    0     0 ACCEPT     all  --  vlan+  vlan2   0.0.0.0/0            0.0.0.0/0           
    0     0 DROP       all  --  vlan+  vlan+   0.0.0.0/0            0.0.0.0/0           
    0     0 ACCEPT     tcp  --  *      *       10.0.0.0/16          10.0.50.10           multiport dports 5000,5001
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            10.0.50.10           multiport dports 80,443,6690
    0     0 ACCEPT     all  --  vlan2  vlan+   0.0.0.0/0            0.0.0.0/0           
    0     0 ACCEPT     all  --  vlan+  vlan2   0.0.0.0/0            0.0.0.0/0           
    0     0 DROP       all  --  vlan+  vlan+   0.0.0.0/0            0.0.0.0/0           
    0     0 DROP       all  --  eth1   *       0.0.0.0/0            10.0.50.0/24         state NEW
    0     0 DROP       all  --  eth2   *       0.0.0.0/0            10.0.50.0/24         state NEW
    0     0 DROP       all  --  vlan3  *       0.0.0.0/0            10.0.50.0/24         state NEW
    0     0 DROP       all  --  wl0.1  *       0.0.0.0/0            10.0.50.0/24         state NEW
13732 5630K ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            state RELATED,ESTABLISHED
  408  137K upnp       all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 lan2wan    all  --  vlan3  *       0.0.0.0/0            0.0.0.0/0           
  408  137K lan2wan    all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 ACCEPT     all  --  br0    br0     0.0.0.0/0            0.0.0.0/0           
    0     0 ACCEPT     tcp  --  *      vlan2   10.0.50.0/24         0.0.0.0/0            tcp dpt:1723
    0     0 ACCEPT     47   --  *      vlan2   10.0.50.0/24         0.0.0.0/0           
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            10.0.50.10           tcp dpt:80
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            10.0.50.10           tcp dpt:443
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            10.0.50.10           tcp dpt:6690
    0     0 TRIGGER    all  --  vlan2  br0     0.0.0.0/0            0.0.0.0/0           TRIGGER type:in match:0 relate:0
  407  137K trigger_out  all  --  br0    *       0.0.0.0/0            0.0.0.0/0           
    0     0 TRIGGER    all  --  vlan2  eth0    0.0.0.0/0            0.0.0.0/0           TRIGGER type:in match:0 relate:0
    0     0 trigger_out  all  --  eth0   *       0.0.0.0/0            0.0.0.0/0           
    0     0 ACCEPT     all  --  eth0   *       0.0.0.0/0            0.0.0.0/0            state NEW
    0     0 DROP       all  --  br0    eth1    0.0.0.0/0            0.0.0.0/0            state NEW
    0     0 TRIGGER    all  --  vlan2  eth1    0.0.0.0/0            0.0.0.0/0           TRIGGER type:in match:0 relate:0
    0     0 trigger_out  all  --  eth1   *       0.0.0.0/0            0.0.0.0/0           
    0     0 ACCEPT     all  --  eth1   *       0.0.0.0/0            0.0.0.0/0            state NEW
    0     0 DROP       all  --  br0    eth2    0.0.0.0/0            0.0.0.0/0            state NEW
    0     0 TRIGGER    all  --  vlan2  eth2    0.0.0.0/0            0.0.0.0/0           TRIGGER type:in match:0 relate:0
    0     0 trigger_out  all  --  eth2   *       0.0.0.0/0            0.0.0.0/0           
    0     0 ACCEPT     all  --  eth2   *       0.0.0.0/0            0.0.0.0/0            state NEW
    0     0 TRIGGER    all  --  vlan2  vlan1   0.0.0.0/0            0.0.0.0/0           TRIGGER type:in match:0 relate:0
    1    76 trigger_out  all  --  vlan1  *       0.0.0.0/0            0.0.0.0/0           
    1    76 ACCEPT     all  --  vlan1  *       0.0.0.0/0            0.0.0.0/0            state NEW
    0     0 DROP       all  --  br0    vlan3   0.0.0.0/0            0.0.0.0/0            state NEW
    0     0 TRIGGER    all  --  vlan2  vlan3   0.0.0.0/0            0.0.0.0/0           TRIGGER type:in match:0 relate:0
    0     0 trigger_out  all  --  vlan3  *       0.0.0.0/0            0.0.0.0/0           
    0     0 ACCEPT     all  --  vlan3  *       0.0.0.0/0            0.0.0.0/0            state NEW
    0     0 DROP       all  --  br0    wl0.1   0.0.0.0/0            0.0.0.0/0            state NEW
    0     0 TRIGGER    all  --  vlan2  wl0.1   0.0.0.0/0            0.0.0.0/0           TRIGGER type:in match:0 relate:0
    0     0 trigger_out  all  --  wl0.1  *       0.0.0.0/0            0.0.0.0/0           
    0     0 ACCEPT     all  --  wl0.1  *       0.0.0.0/0            0.0.0.0/0            state NEW
  343  134K ACCEPT     all  --  br0    *       0.0.0.0/0            0.0.0.0/0            state NEW
   64  2560 DROP       all  --  *      *       0.0.0.0/0            0.0.0.0/0           



Networking.png
 Description:
Configuring br1 and DHCP
 Filesize:  26.8 KB
 Viewed:  1268 Time(s)

Networking.png



Bridging.png
 Description:
Creating br1
 Filesize:  25.3 KB
 Viewed:  1267 Time(s)

Bridging.png



Wireless.png
 Description:
Wireless config
 Filesize:  65.32 KB
 Viewed:  1267 Time(s)

Wireless.png




Last edited by Encephala on Sun Oct 02, 2022 13:49; edited 1 time in total
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12917
Location: Netherlands

PostPosted: Sun Oct 02, 2022 9:28    Post subject: Reply with quote
Unfortunately I have very little time to look at it in detail but I am sure others will chime in.

On first glance it looks needlessly complicated.

Net isolation is sufficient to isolate unbridged interfaces from the main network.

So the only thing you have to do is isolate br1 from vlan3.

I see a lot of DROP rules from the individual interfaces those should not be there as they only can come if those interfaces are unbridged and Net isolation is turned on but the only unbridged interfaces should be br1 and vlan3, the wireless interfaces should all be kept bridged (as they are bridged to br1).

Maybe it is a left over so first thing I would do is reboot the 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
Encephala
DD-WRT Novice


Joined: 02 Oct 2022
Posts: 6

PostPosted: Sun Oct 02, 2022 12:19    Post subject: Reply with quote
Good to hear I'm overthinking, that should mean the solution is more simple Smile

To test what you say, I've removed my Firewall commands and removed every reference to br1, with all interfaces back on br0. I then reboot and run iptables -vnL FORWARD again, and indeed a lot of the DROP rules towards the top are now gone. I tested another reboot with the firewall commands in place and the rules show up again, so it's clear that's where they're coming from. However, there is no rule that contains br1. I add br1 again, with net isolation, still no internet. This is what iptables -vnL FORWARD | grep br1 gives:
Code:
    0     0 DROP       all  --  br1    *       0.0.0.0/0            10.0.50.0/24         state NEW
    0     0 lan2wan    all  --  br1    *       0.0.0.0/0            0.0.0.0/0           
    0     0 DROP       all  --  br0    br1     0.0.0.0/0            0.0.0.0/0            state NEW
    0     0 TRIGGER    all  --  vlan2  br1     0.0.0.0/0            0.0.0.0/0           TRIGGER type:in match:0 relate:0
    0     0 trigger_out  all  --  br1    *       0.0.0.0/0            0.0.0.0/0           
    0     0 ACCEPT     all  --  br1    *       0.0.0.0/0            0.0.0.0/0            state NEW
    0     0 ACCEPT     all  --  br1    vlan2   0.0.0.0/0            0.0.0.0/0           


Turning off net isolation, I still have no internet:
Code:
    0     0 lan2wan    all  --  br1    *       0.0.0.0/0            0.0.0.0/0           
    0     0 TRIGGER    all  --  vlan2  br1     0.0.0.0/0            0.0.0.0/0           TRIGGER type:in match:0 relate:0
    0     0 trigger_out  all  --  br1    *       0.0.0.0/0            0.0.0.0/0           
    0     0 ACCEPT     all  --  br1    *       0.0.0.0/0            0.0.0.0/0            state NEW
    0     0 ACCEPT     all  --  br1    vlan2   0.0.0.0/0            0.0.0.0/0           


Removing all the wireless interfaces from br1 gives my clients internet access.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12917
Location: Netherlands

PostPosted: Sun Oct 02, 2022 13:01    Post subject: Reply with quote
I had time to get a closer look, your IP address is wrong, it is supposed to be be an address not a network e.g. should be 10.0.52.1/24
_________________
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
Encephala
DD-WRT Novice


Joined: 02 Oct 2022
Posts: 6

PostPosted: Sun Oct 02, 2022 13:48    Post subject: Solved Reply with quote
Ah, that did the trick! Thank you!
Encephala
DD-WRT Novice


Joined: 02 Oct 2022
Posts: 6

PostPosted: Sun Oct 02, 2022 13:58    Post subject: Reply with quote
Thanks a lot actually! It feels really good to finally have this working after like 24 hours, even though the solution was so simple.

Hope the thread helps somebody else (:
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12917
Location: Netherlands

PostPosted: Sun Oct 02, 2022 14:01    Post subject: Reply with quote
Glad it is solved Smile
_________________
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 -> Broadcom SoC 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 can attach files in this forum
You can download files in this forum