Skip to content

Instantly share code, notes, and snippets.

@miguelfrde
Last active March 29, 2020 15:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save miguelfrde/4a50f46afaf1ec9a5089 to your computer and use it in GitHub Desktop.
Save miguelfrde/4a50f46afaf1ec9a5089 to your computer and use it in GitHub Desktop.
Raspberry Pi static IP wlan
###########################
# /etc/network/interfaces #
###########################
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug eth0
iface eth0 inet manual
auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
auto wlan1
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
###########################################
# /etc/wpa_supplicant/wpa_supplicant.conf #
###########################################
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="Network SSID"
psk="Network password"
}
###################
# /etc/dhcpc.conf #
###################
interface wlan0
static ip_address=192.168.1.10/24
static routers=192.168.1.254
static domain_name_servers=192.168.1.254
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment