Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save JourneymanGeek/c62df83420ba0f6035402f9a3a8675f7 to your computer and use it in GitHub Desktop.
Save JourneymanGeek/c62df83420ba0f6035402f9a3a8675f7 to your computer and use it in GitHub Desktop.
Plug in one interface
use ip addr to work out which interfaces there are and which is the WAN interface
Set up /etc/networks/interfaces
#loopback
auto lo
iface lo inet loopback
#primary interface, to internet
auto eth0
iface eth0 inet dhcp
#Bridged interfaces
auto br0
iface br0 inet static
address 192.168.3.1
netmask 24
bridge_ports enxc0742bffdd77 wlan0
#we need to stop systemd-resolved:this interfers with dnsmasq
sudo systemctl disable systemd-resolved
sudo systemctl stop systemd-resolved
#Silly race conditions - disable network manager. Sometimes it takes a little longer to get an IP. We don't need it anyway
sudo systemctl stop NetworkManager.service
sudo systemctl disable NetworkManager.service
/etc/dnsmasq.conf
# Add other name servers here, with domain specs if they are for
# non-public domains.
#server=/localnet/192.168.0.1
server=8.8.8.8
# If you want dnsmasq to listen for DHCP and DNS requests only on
# specified interfaces (and the loopback) give the name of the
# interface (eg eth0) here.
# Repeat the line for more than one interface.
interface=br0
# Or you can specify which interface _not_ to listen on
except-interface=eth0
# Uncomment this to enable the integrated DHCP server, you need
# to supply the range of addresses available for lease and optionally
# a lease time. If you have more than one network, you will need to
# repeat this for each network on which you want to supply DHCP
# service.
dhcp-range=192.168.3.50,192.168.3.150,12h
/etc/hostapd.conf - from armbian defaults
# armbian hostapd configuration example
#
# nl80211 mode
ssid=TEST
interface=wlan0
hw_mode=g
channel=5
#bridge=br0
driver=nl80211
logger_syslog=0
logger_syslog_level=0
wmm_enabled=1
wpa=2
preamble=1
wpa_psk=66eb31d2b48d19ba216f2e50c6831ee11be98e2fa3a8075e30b866f4a5ccda27
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
auth_algs=1
macaddr_acl=0
noscan=1
## IEEE 802.11n
ieee80211n=1
ht_capab=[HT40-][SHORT-GI-40][SHORT-GI-40][DSSS_CCK-40]
country_code=US
ieee80211d=1
## IEEE 802.11n
### IEEE 802.11a
#hw_mode=a
### IEEE 802.11a
### IEEE 802.11ac
#ieee80211ac=1
#vht_capab=[MAX-MPDU-11454][SHORT-GI-80][TX-STBC-2BY1][RX-STBC-1][MAX-A-MPDU-LE$
#vht_oper_chwidth=1
#vht_oper_centr_freq_seg0_idx=42
### IEEE 802.11ac
# controlling enabled
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment