0

I have an ubuntu system with a USB wifi dongle set up as both an AP and Client and it's routing my internet connection. I followed the instructions at http://imti.co/post/145442415333/raspberry-pi-3-wifi-station-ap and it seems to be working well.

What I'm trying to figure out how to do is restrict devices connected to the AP to only the AP's IP of 192.168.50.1 I do not want the user of the AP to have any internet access.

The goal is that someone can connect to the AP and access a configuration web page to configure the wifi client.

So far the only rule added to iptables is:

iptables -t nat -A POSTROUTING -s 192.168.50.0/24 ! -d 192.168.50.0/24 -j MASQUERADE

I'm not even sure what to call this process at this point, so any help would be greatly appreciated.

1
  • I found that when I simpy enabled UFW does exactly what I was after. (But I have no idea why.) I can still access the nginx server @ 192.168.50.1 but my phone can no longer access the internet through the AP. I'm going to wait to see if some gives a proper answer to this question before I answer it myself. Commented Mar 19, 2017 at 23:22

1 Answer 1

0

In ubuntu, simply enabling ufw (allow port 22 first!) blocks all traffic between the AP and the Client (So AP users cannot get to the internet) but still allows the AP users to access the webserver on the device.

Not the answer you're looking for? Browse other questions tagged .