Wifi Hotspot without internet connection sharing

When creating a Wifi hotspot, my laptop’s wired internet connection is automatically shared to the devices connecting to the access point.

How can I disable this? I want to provide an access point, but only for the connecting devices to access the laptop’s HTTP server. They shall not be able to connect to the outer world.

(This is on Debian testing, NetworkManager 1.50.0-1+b1)

1 Like

Thank you for the answer.

I fear that this is a solution that affects all connections, not only the current wifi hotspot I want to configure.

I’ve resorted to disabling ip forwarding for my wifi connection:

$ sysctl -a|grep ^net|grep \\.forwarding           
net.ipv4.conf.all.forwarding = 1                   
net.ipv4.conf.br0.forwarding = 1                   
net.ipv4.conf.default.forwarding = 0               
net.ipv4.conf.enx000ec6e25b11.forwarding = 1       
net.ipv4.conf.lo.forwarding = 1                    
net.ipv4.conf.wlp1s0.forwarding = 0 <--- wifi      
                                                   
$ sudo sysctl -w net.ipv4.conf.wlp1s0.forwarding=0