My laptop can not access internet after setup bridge with wired NIC and wireless NIC
- by Victor S
I setup a bridge using wired NIC and wireless NIC in order to make wireless NIC as a Wi-Fi AP to share wired internet access, after setup successfully, the Wi-Fi AP works as my expectation, but my laptop can not access internet, please give me a hand. Thanks.
My hostapd.conf
$ cat hostapd.conf
interface=wlan0
bridge=br0
driver=nl80211
ssid=myAP
hw_mode=g
channel=11
dtim_period=1
rts_threshold=2347
fragm_threshold=2346
macaddr_acl=0
auth_algs=3
ieee80211n=0
wpa=3
wpa_passphrase=PassWord
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
Setup steps:
$ sudo killall hostapd
hostapd: no process found
$ sudo hostapd -B hostapd.conf
Configuration file: hostapd.conf
Using interface wlan0 with hwaddr 00:26:5e:e8:4f:8e and ssid 'myAP'
$ sudo brctl addbr br0
device br0 already exists; can't create bridge with the same name
$ sudo ifconfig eth0 0.0.0.0 up
$ sudo ifconfig wlan0 0.0.0.0 up
$ sudo brctl addif br0 eth0
$ sudo brctl addif br0 wlan0
device wlan0 is already a member of a bridge; can't enslave it to bridge br0.
$ sudo ifconfig br0 192.168.1.110 netmask 255.255.255.0
$ sudo route add default gw 192.168.1.1