I have a nice Asus router on one end of my house. On the other end, I have my server that happened to have a built-in wi-fi card. I wasn't using the wi-fi card in the server until one evening I listened to my kids complain about the signal at that end of the house. I dove into the server and it's network config and managed to get the wi-fi card up as a wireless access point, and voila - we have two wifi access points.
The downsides to the server wi-fi access are:
#2 means while connected to the Asus router you get an IP range from 192.168.1.2 to 192.168.1.198 (a range I set to reserve fixed IP's) but while connected to the server AP you get 192.168.0.50 to 192.168.0.150.
This results in a solid and usable internet connection for ether connection, but devices connected to one AP cannot connect to various services on the other. Mostly, this involves my server itself which is hard-wired to the Asus router for it's connection but also KDE Connect cannot connect to my phone if I'm connected to the server AP instead of the router.
To get this to the state it's currently in, I muddled through dozens of networking AP how-to's until I landed on using hostapd to configure the AP.
Here's the contents (minus remarks) of /etc/dnsmasq.conf
Here's the entire contents of /etc/hostapd.d/hostapd.conf:
and heres' /etc/network/interfaces:
So you can see the setup is rather simple.
I did muck about with the IP tables:
What I want to be able be able to connect to every computer on the network and all the services via both AP's. I either have to figure out how to get both devices working on the same IP group or "bridge" them or something, but I'm too network n00b-ish to know where to begin.
Hints or suggestions?
The downsides to the server wi-fi access are:
- I cannot get "N" class connections enabled, only "G", even though the card is N capable. My 'net research reveals this may be a firmware limitation so I gave up on it. This isn't a deal-breaker anyway.
- I learned (rightly or wrongly) that I could only make it work at all if I used a different set of IP addresses.
#2 means while connected to the Asus router you get an IP range from 192.168.1.2 to 192.168.1.198 (a range I set to reserve fixed IP's) but while connected to the server AP you get 192.168.0.50 to 192.168.0.150.
This results in a solid and usable internet connection for ether connection, but devices connected to one AP cannot connect to various services on the other. Mostly, this involves my server itself which is hard-wired to the Asus router for it's connection but also KDE Connect cannot connect to my phone if I'm connected to the server AP instead of the router.
To get this to the state it's currently in, I muddled through dozens of networking AP how-to's until I landed on using hostapd to configure the AP.
Here's the contents (minus remarks) of /etc/dnsmasq.conf
Code:
server=8.8.4.4 server=198.153.194.1 interface=wlan0 dhcp-range=192.168.0.50,192.168.0.150,24h
Code:
[FONT=monospace][COLOR=#000000]# WiFi Hotspot[/COLOR] interface=wlan0 driver=nl80211 #Access Point ssid=smithserver hw_mode=g # WiFi Channel: channel=1 macaddr_acl=0 auth_algs=1 ignore_broadcast_ssid=0 wpa=2 wpa_passphrase=<NON_YA_BIN_ESS> wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP rsn_pairwise=CCMP # 802.11n (HT) is enabled ieee80211n=1 ht_capab=[SHORT-GI-40][HT40+][HT40-][DSSS_CCK-40] wmm_enabled=1 wmm_ac_bk_cwmin=4 wmm_ac_bk_cwmax=10 wmm_ac_bk_aifs=7 wmm_ac_bk_txop_limit=0 wmm_ac_bk_acm=0 wmm_ac_be_aifs=3 wmm_ac_be_cwmin=4 wmm_ac_be_cwmax=10 wmm_ac_be_txop_limit=0 wmm_ac_be_acm=0 wmm_ac_vi_aifs=2 wmm_ac_vi_cwmin=3 wmm_ac_vi_cwmax=4 wmm_ac_vi_txop_limit=94 wmm_ac_vi_acm=0 wmm_ac_vo_aifs=2 wmm_ac_vo_cwmin=2 wmm_ac_vo_cwmax=3 wmm_ac_vo_txop_limit=47 wmm_ac_vo_acm=0 [/FONT]
Code:
[FONT=monospace][COLOR=#000000]# This file describes the network interfaces available on your system[/COLOR] # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback auto eth0 iface eth0 inet manual bond-master bond0 auto eth1 iface eth1 inet manual bond-master bond0 auto bond0 iface bond0 inet static address 192.168.1.250 netmask 255.255.255.0 broadcast 192.168.1.255 gateway 192.168.1.1 bond-mode 0 bomd-miimon 100 bond-slaves none dns-nameservers 192.168.1.1 dns-search smith.lan dns-domain smith.lan network 192.168.1.0 pre-up iptables-restore < /etc/iptables.rules post-down iptables-save > /etc/iptables.rules iface wlan0 inet static hostapd /etc/hostapd/hostapd.conf address 192.168.0.250 netmask 255.255.255.0 [/FONT]
I did muck about with the IP tables:
smith@server:/mnt/sde2$ sudo iptables -t nat -L -v
Chain PREROUTING (policy ACCEPT 1748K packets, 530M bytes)
pkts bytes target prot opt in out source destination
Chain INPUT (policy ACCEPT 1694K packets, 525M bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 1346K packets, 325M bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 1114K packets, 299M bytes)
pkts bytes target prot opt in out source destination
260K 29M MASQUERADE all -- any bond0 anywhere anywhere
Chain PREROUTING (policy ACCEPT 1748K packets, 530M bytes)
pkts bytes target prot opt in out source destination
Chain INPUT (policy ACCEPT 1694K packets, 525M bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 1346K packets, 325M bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 1114K packets, 299M bytes)
pkts bytes target prot opt in out source destination
260K 29M MASQUERADE all -- any bond0 anywhere anywhere
Hints or suggestions?
Comment