Remove remote access from WIFI

Post new topic   Reply to topic    DD-WRT Forum Index -> Marvell MVEBU based Hardware (WRT1900AC etc.)
Goto page 1, 2, 3  Next
Author Message
naan
DD-WRT Novice


Joined: 05 Jun 2024
Posts: 17

PostPosted: Wed Jun 05, 2024 0:33    Post subject: Remove remote access from WIFI Reply with quote
Hello all,

I have a vpn router (192.168.xx.1) + a linksys wrt1900acs running dd-wrt 49418 (192.168.xx.2) on a 192.168.xx.xx vlan for internet access and site wide VPN.

The Linksys provides all wifi, dhcp, wifi security, etc, for this internet vlan. The VPN router simply manages the VPN and nothing more. All is working fine EXCEPT for the fact I found out the other day that when accessing internet via my WIFI I am able to hit the config pages for both routers. Something I don't want happening.

I do not want access to EITHER routers' config page enabled via WIFI at all. I only want admin access to EITHER routers' config to be accessible thru my local wired LAN. I have tried to apply iptable FW rules to DD-WRT similar to these below, but all this does is remove access to the DD-WRT web config page for everywhere - i.e. it doesn't do what is needed.

iptables -I INPUT -i br0 -p tcp --dport 80 -j REJECT
iptables -A INPUT -i br0 -p tcp -s 192.168.xx.xx --dport 80 -j ACCEPT

So I am appealing to the good nature of any iptable guru's to give me a hand to be able to eliminate access to both routers config pages via WIFI - BUT leave the wired LAN access to the web config's of both routers INTACT.

thanks in advance!
Sponsor
kernel-panic69
DD-WRT Guru


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

PostPosted: Wed Jun 05, 2024 1:03    Post subject: Reply with quote
Why not upgrade to a release that supports configuring this via webUI?

#3544 closed (fixed) BUG: cannot disable wireless webUI access (Broadcom)

#5898 closed (fixed) Feature request: Disable webUI access via wifi on Marvell

[SOLVED-FIXED]Disable Wireless Access To WebUI not working

https://download1.dd-wrt.com/dd-wrtv2/downloads/betas/2024/

_________________
"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...
RSS feed for DD-WRT releases (2025)
RSS feed for DD-WRT releases (2024)
RSS feed for DD-WRT releases (2023)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
naan
DD-WRT Novice


Joined: 05 Jun 2024
Posts: 17

PostPosted: Wed Jun 05, 2024 1:57    Post subject: Reply with quote
The firmware bug you're citing is for Broadcom based routers not Marvell. Admittedly that dd-wrt feature doesn't work in v49418 for Marvell either. Even if going to a later version of DD-WRT that may, or may not, fix that particular function, dd-wrt is only half of the issue.

The other half is the fact that the VPN router does NOT have a web-gui disable of any kind so firewall rule(s) will have to be employed to keep that routers' GUI off of wireless. Unless I am missing something.
kernel-panic69
DD-WRT Guru


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

PostPosted: Wed Jun 05, 2024 2:33    Post subject: Reply with quote
Again, DD-WRT version newer than r50548... but let's just keep beating on that part. It works fine on my WRT3200ACM on the current release (56490).

https://svn.dd-wrt.com/ticket/5670

Above post in Broadcom Forum, page 3

Above post in Broadcom Forum, page 3

Now, as far as your upstream router that is not running DD-WRT, if it has no way of configuring specific IP access to webUI, then you would need to use firewall rules in DD-WRT to prevent access as well as turning off the wifi on that device, if so equipped. Good luck on that remaining, because if your ISP ever comes to work on anything, that will get re-enabled because the techs use their cell phones to access the ISP gear. Somewhere in the above linked thread pages is ebtables rules that I previously used that worked flawlessly, but you may need to specify destination IP address with either option...

_________________
"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...
RSS feed for DD-WRT releases (2025)
RSS feed for DD-WRT releases (2024)
RSS feed for DD-WRT releases (2023)

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


Joined: 19 Feb 2019
Posts: 4015
Location: Germany

PostPosted: Wed Jun 05, 2024 17:41    Post subject: Reply with quote
@naan

It is not very helpful that you mask private IP addresses.
And certainly unnecessary as millions of others use the same private and non-public IP addresses.
This makes it difficult to give good recommendations.

If the routers are in the same subnet then you need “ebtables” because in that case you want to control traffic within a bridge and that is outside the capabilities of iptables.

_________________
Quickstart guides:

use Pi-Hole as simple DNS-Server with DD-WRT

Routers
Marvell OCTEON TX2 - QHora-322 - OpenWrt 25.12.6 - Gateway
Qualcomm IPQ8065 - R7800 - dd-wrt r53562 - WAP
naan
DD-WRT Novice


Joined: 05 Jun 2024
Posts: 17

PostPosted: Wed Jun 05, 2024 23:32    Post subject: Reply with quote
TO BE CRYSTAL CLEAR:
I DO NOT want the web interface flat out disabled. I only want the web interface to be made unavailable thru WIFI, which on my network is provided solely by the Linksys router and is the 2.4mhz radio only. The other radio is disabled completely. The web interface MUST be available ONLY through the wired network and not simply disabled in total.

I did find the "ebtables" filter listing - much appreciated. I also noticed a section of thread that was attempting to define what interface designations were which. I find I am now wondering the same thing. Here is a snippet of the available interfaces;

Code:
0;~# ip link show

1: lo:
2: eth0:
3: eth1:
4: teql0:
7: vlan1@eth1:
20: br0:
21: wlan1:


I assume that my interface of interest for the rule sets are to be confined to the "wlan1" interface? Regarding the source and destination - what would those be exactly? The two routers are on the same subnet and are 192.168.xx.1 (vpn) and 192.168.xx.2 (linksys-dd-wrt) respectively.

Also, the pointer to the "2024 builds" page is labeled "/dd-wrtv2/downloads/betas/2024/". I do not want to run BETA firmware. Is there a page that lists latest STABLE 2024 builds for the Marvell wrt1900acs v2?

thanks in advance
bushant
DD-WRT Guru


Joined: 18 Nov 2015
Posts: 2221

PostPosted: Wed Jun 05, 2024 23:51    Post subject: Reply with quote
@naan
All firmwares have been beta since 2008
Your current build from 2022 is from https://download1.dd-wrt.com/dd-wrtv2/downloads/betas/2022/07-04-2022-r49418/

You have been running Beta build for almost 2 years now.

You need to update your firmware to take advantage of GUI settings introduced since your build that will probably solve your issue.

As well as numerous security fixes.

_________________
Forum Guide Lines (with helpful pointers about how to research your router, where and what firmware to download, where and how to post and many other helpful tips!)
How to get help the right way

Before asking for help - Read the forum guidelines AND Upgrade DD-WRT!
naan
DD-WRT Novice


Joined: 05 Jun 2024
Posts: 17

PostPosted: Thu Jun 06, 2024 2:57    Post subject: Reply with quote
Well, we can now put to bed the whole idea of "update the firmware and part of the issue will be fixed". FW upgrade does not fix the issue with dd-wrt's web config showing up on WIFI.

Setting Adminstration > Management > Remote Access > "allow any remote ip" to DISABLE and then entering the IP of a wired LAN machine as the "Allowed remote IP". I can still connect to WIFI and by putting in the ip of the router the config page still pulls up just as always.

Also under Wireless 2.4ghz > advanced > setting "web UI access" to DISABLE does absolutely nothing.

Unless I am missing something obvious here this firmware update to 3.0-r56490 did NOTHING with respect to fixing any part of this issue. I will say that the router does seem a little snappier speed wise, but that's about it...

The original issues are still present.

I am curious to learn more about the usage of the source and destination IP's regarding the "ebtables" filters and how it applies here as well as clarification on the proper interface designation to use.

please advise. thanks
kernel-panic69
DD-WRT Guru


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

PostPosted: Thu Jun 06, 2024 3:33    Post subject: Reply with quote
Did you do a complete reset after upgrade? Probably not. May still have old values for the web filter for wifi.
_________________
"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...
RSS feed for DD-WRT releases (2025)
RSS feed for DD-WRT releases (2024)
RSS feed for DD-WRT releases (2023)

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


Joined: 19 Feb 2019
Posts: 4015
Location: Germany

PostPosted: Thu Jun 06, 2024 7:13    Post subject: Reply with quote
@naan

Code:
ebtables -I FORWARD -i wlan1 -o vlan1 -p ipv4 --ip-proto tcp --ip-destination 192.168.1.1 --ip-destination-port 80 -j DROP


Code:
ebtables -I INPUT -i wlan1 -p ipv4 --ip-proto tcp --ip-destination 192.168.1.2 --ip-destination-port 80 -j DROP


The examples only block access to port80
additional rules are required for other ports.

For better isolation and more control, it may be helpful to use a more complicated setup with multiple subnets.

However the rules do what you want.

_________________
Quickstart guides:

use Pi-Hole as simple DNS-Server with DD-WRT

Routers
Marvell OCTEON TX2 - QHora-322 - OpenWrt 25.12.6 - Gateway
Qualcomm IPQ8065 - R7800 - dd-wrt r53562 - WAP


Last edited by ho1Aetoo on Thu Jun 06, 2024 8:18; edited 9 times in total
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 13879
Location: Netherlands

PostPosted: Thu Jun 06, 2024 7:21    Post subject: Reply with quote
For untrusted clients make a guest wifi which has no access to the router by just ticking `Net Isolation`
_________________
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
naan
DD-WRT Novice


Joined: 05 Jun 2024
Posts: 17

PostPosted: Thu Jun 06, 2024 22:37    Post subject: Reply with quote
ho1Aetoo wrote:
@naan
Code:
ebtables -I INPUT -i wlan1 -p ipv4 --ip-proto tcp --ip-destination 192.168.1.2 --ip-destination-port 80 -j DROP


This rule above works perfectly for suppressing the dd-wrt config. Many thanks!



ho1Aetoo wrote:
@naan
Code:
ebtables -I FORWARD -i wlan1 -o vlan1 -p ipv4 --ip-proto tcp --ip-destination 192.168.1.1 --ip-destination-port 80 -j DROP


This one above doesn't appear to work for suppressing the vpn router config panel however. I noticed that with the firmware now upgraded to v3.0-r56490 the interface list has changed from the older version.
The new interface list;

Code:
 ip link show
1: lo:
2: eth0:
3: eth1:
4: teql0:
11: br0:
12: wlan1:


Does the rule for the 192.168.xx.1 vpn router need to point at a different interface perhaps?
kernel-panic69
DD-WRT Guru


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

PostPosted: Thu Jun 06, 2024 23:39    Post subject: Reply with quote
Possibly br0 vs vlan1 if you need the output interface at all.
_________________
"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...
RSS feed for DD-WRT releases (2025)
RSS feed for DD-WRT releases (2024)
RSS feed for DD-WRT releases (2023)

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


Joined: 19 Feb 2019
Posts: 4015
Location: Germany

PostPosted: Fri Jun 07, 2024 6:05    Post subject: Reply with quote
naan wrote:
ho1Aetoo wrote:
@naan
Code:
ebtables -I INPUT -i wlan1 -p ipv4 --ip-proto tcp --ip-destination 192.168.1.2 --ip-destination-port 80 -j DROP


This rule above works perfectly for suppressing the dd-wrt config. Many thanks!



ho1Aetoo wrote:
@naan
Code:
ebtables -I FORWARD -i wlan1 -o vlan1 -p ipv4 --ip-proto tcp --ip-destination 192.168.1.1 --ip-destination-port 80 -j DROP


This one above doesn't appear to work for suppressing the vpn router config panel however. I noticed that with the firmware now upgraded to v3.0-r56490 the interface list has changed from the older version.
The new interface list;

Code:
 ip link show
1: lo:
2: eth0:
3: eth1:
4: teql0:
11: br0:
12: wlan1:


Does the rule for the 192.168.xx.1 vpn router need to point at a different interface perhaps?



You wrote above that you use VLAN and in your interface list VLAN1 was listed and VLAN1 is normally the LAN.

If no VLANs are configured on the router then you have to use eth1 instead of VLAN1 (assuming this is also your LAN interface and the vpn router is conntected to a LAN Port)

Code:
ebtables -I FORWARD -i wlan1 -o eth1 -p ipv4 --ip-proto tcp --ip-destination 192.168.1.1 --ip-destination-port 80 -j DROP

_________________
Quickstart guides:

use Pi-Hole as simple DNS-Server with DD-WRT

Routers
Marvell OCTEON TX2 - QHora-322 - OpenWrt 25.12.6 - Gateway
Qualcomm IPQ8065 - R7800 - dd-wrt r53562 - WAP


Last edited by ho1Aetoo on Fri Jun 07, 2024 7:50; edited 1 time in total
kernel-panic69
DD-WRT Guru


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

PostPosted: Fri Jun 07, 2024 6:19    Post subject: Reply with quote
Try:
Code:
ebtables -I INPUT -i wlan1 -p ipv4 --ip-proto tcp --ip-destination 192.168.1.1 --ip-destination-port 80 -j DROP

Both devices are on the same subnet, which would mean that they are both on the LAN side of DD-WRT, correct? Seems the picture is that the VPN router and DD-WRT are connected LAN <-> LAN. Further information required to rule my presumption out.

_________________
"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...
RSS feed for DD-WRT releases (2025)
RSS feed for DD-WRT releases (2024)
RSS feed for DD-WRT releases (2023)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
Goto page 1, 2, 3  Next Display posts from previous:    Page 1 of 3
Post new topic   Reply to topic    DD-WRT Forum Index -> Marvell MVEBU based Hardware (WRT1900AC etc.) 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