You are not logged in.

#1 2020-11-17 21:13:39

scottsteely
Member
Registered: 2020-11-17
Posts: 2

Setting up a NAT access point using hostapd

Hello all,
I am trying to setup a NAT access point with IP Masquerade because I am connected to public internet. I have attempted to follow the instructions listed here: https://wiki.archlinux.org/index.php/Internet_sharing and https://wiki.archlinux.org/index.php/so … cess_point .

My wifi card supports Wireless client and software AP with a single Wi-Fi device:

iw list : valid interface combinations: * #{ managed } <= 1, #{ AP, P2P-client, P2P-GO } <= 1, #{ P2P-device } <= 1, total <= 3, #channels <= 2

The next instructions say that:

you need to create two separate virtual interfaces for using it. Virtual interfaces for a physical device wlan0

I am able to create both wlan0_sta and wlan0_ap but I am unclear what the purpose of wlan0_sta is.

This is my hostapd.conf which I can connect to only if I comment out bridge=br0 . (do I need this if I'm setting up a NAT?)

interface=wlan0_ap
#bridge=br0
driver=nl80211
ssid=xxxxxxxx
hw_mode=g
channel=6
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=xxxxxxxx
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

# hostapd event logger configuration
logger_stdout=-1
logger_stdout_level=2

I am able to connect to this AP but I do not have internet.
I verified IP forwarding with

sysctl -a | grep forward

http://ix.io/2Ew3

I have enabled the IP Tables per the instructions.
http://ix.io/2Ew7

Here is my dhcpd.conf

option domain-name-servers 8.8.8.8, 8.8.4.4;
option subnet-mask 255.255.255.0;
#option routers 139.96.30.100;
subnet 192.168.123.0 netmask 255.255.255.0 {
  range 192.168.123.2 192.168.123.25;
}

Also here are my systemd.networkd rules:
25-wireless.network
30-wlan0_ap.network

I would really apretiate if anyone could look these over. I'm sure I've miss-configured something, I'm just not sure what. Thanks.

Offline

Board footer

Powered by FluxBB