nodogsplash icon indicating copy to clipboard operation
nodogsplash copied to clipboard

No connect to local from wlan-client on raspap

Open schorges opened this issue 4 years ago • 4 comments

I have installed nodogsplash and apache2 on rpi with deb-buster, i changed my lighttpd to port 81 and apache2 on port 80 on port 5000 works my dotnet.dll test-app

on an local client > eth0, i can access apache2 pages and dotnet on rpi successfull

when i connect as wlan client (it runs raspap-hotspot) internet access works after splashpage, but i cant connect to local pages

$: sudo iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
ndsOUT     all  --  anywhere             anywhere

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
MASQUERADE  all  --  anywhere             anywhere
MASQUERADE  all  --  192.168.50.0/24     !192.168.50.0/24

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain ndsOUT (1 references)
target     prot opt source               destination
RETURN     all  --  anywhere             anywhere             mark match 0x20000/0x30000
RETURN     all  --  anywhere             anywhere             mark match 0x30000/0x30000
DNAT       tcp  --  anywhere             anywhere             tcp dpt:http to:10.3.141.1:2050
ACCEPT     all  --  anywhere             anywhere

schorges avatar Sep 07 '21 08:09 schorges

@schorges You need to add the ports of your local services to the users-to-router policy in the NoDogsplash config

bluewavenet avatar Sep 07 '21 08:09 bluewavenet

Thanks, this is work for me. But i'd like to connect to the hostname, not to the gateway IP 192.168.220.1:5000 eg: raspberry:5000

this is my sudo nano /etc/nodogsplash/nodogsplash.conf


GatewayInterface wlan0
GatewayAddress 192.168.220.1
MaxClients 250
AuthIdleTimeout 480


FirewallRuleSet users-to-router {
 # Nodogsplash automatically allows tcp to GatewayPort,
 # at GatewayAddress, to serve the splash page.
 # However you may want to open up other ports, e.g.
 # 53 for DNS and 67 for DHCP if the router itself is
 # providing these services.
    FirewallRule allow udp port 53
    FirewallRule allow tcp port 53
    FirewallRule allow udp port 67
 # You may want to allow ssh, http, and https to the router
 # for administration from the GatewayInterface.  If not,
 # comment these out.
   FirewallRule allow tcp port 22
   FirewallRule allow tcp port 80
   FirewallRule allow tcp port 443
   FirewallRule allow tcp port 5000
}

after connect with wlan device no connection to apache2 or dotnet on port 5000 with the hostname:5000 or the ipadress

when i connect with http://192.168.220.1:5000 or 80 it work's fine!

How can i change to get the device/Gateway by hostname ?

schorges avatar Sep 07 '21 13:09 schorges

@schorges

How can i change to get the device/Gateway by hostname ?

Add it to the /etc/hosts file.

bluewavenet avatar Sep 07 '21 21:09 bluewavenet

Thanks! I add this and it works

sudo nano /etc/hosts
192.168.220.1           raspberry

i actually read all comments about runnig CPD offline, but i can't find a way to run this. Have I overlooked something to get this work?

schorges avatar Sep 08 '21 14:09 schorges