0

I am attempting to configure a linux box to use the wlan0 interface as an access point using hostapd. eth0 is the only ethernet port that is connected to a router. I am able to connect to the access point and it receives internet access however when hostapd is running and the wlan0 interface is up, I am unable to access the internet on the box itsself (unable to SSH into it and unable to update the NTP).

Topology br0 = eth0 + wlan0 && br0 stp = ON && linux ipv4_forward ENABLED

Netfilter NO iptables or ebtables rules are in effect (all ACCEPT)

Here is the contents of /etc/network/interfaces

auto lo br0
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet manual

allow-hotplug wlan0
iface wlan0 inet manual

iface br0 inet dhcp
bridge_ports eth0 wlan0
pre-up ifconfig eth0 0.0.0.0 up
pre-up ifconfig wlan0 0.0.0.0 up
pre-up brctl addbr br0
pre-up brctl addif br0 eth0
post-down ifconfig wlan0 0.0.0.0 down
post-down ifconfig eth0 0.0.0.0 down
post-down brctl delif br0 eth0
post-down brctl delbr br0

Here is the output of brctl show

bridge name     bridge id               STP enabled     interfaces
br0             8000.00c0ca8ffbc5       yes             eth0
                                                        wlan0

Here is the contents of /etc/hostapd/hostapd.conf

interface=wlan0
bridge=br0

driver=nl80211
country_code=US
hw_mode=a
beacon_int=100

#NON DFS CHAN:  36, 40, 44, 48, 149, 153, 157, 161
channel=149

ieee80211n=1
ieee80211ac=1
ht_capab=[HT20][HT40]

ssid=Raspberry
wpa_passphrase=friendlyap
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP

Here is the output for ip route show

default via 192.168.1.1 dev br0
default via 192.168.1.1 dev br0  metric 204
169.254.0.0/16 dev eth0  proto kernel  scope link  src 169.254.22.129  metric 202
192.168.1.0/24 dev br0  proto kernel  scope link  src 192.168.1.106  metric 204

Output of ifconfig

br0       Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx
          inet addr:192.168.1.106  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:119 errors:0 dropped:0 overruns:0 frame:0
          TX packets:108 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:9298 (9.0 KiB)  TX bytes:10357 (10.1 KiB)

eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx
          inet addr:169.254.22.129  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:119 errors:0 dropped:0 overruns:0 frame:0
          TX packets:132 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:9298 (9.0 KiB)  TX bytes:17208 (16.8 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:98 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:7569 (7.3 KiB)

Where 192.168.1.1 is the router's IP.

If I run the following commands, I am able to access the box's SSH and update the NTP.

ifconfig wlan0 down
service hostapd stop

My suspicion is that the route table is incorrect or one of the entries has an invalid metric. I appreciate your suggestions!

0 Answers0