Wifi as client
By default d-diot is configured to use the Wifi module in access point mode. Follow this guide to configure the wifi as a standard client for you already existent wifi network.
Disable hostapd and dnsmasq
pi@d-diot:~ $ sudo systemctl stop dnsmasq pi@d-diot:~ $ sudo systemctl disable dnsmasq pi@d-diot:~ $ sudo systemctl stop hostapd pi@d-diot:~ $ sudo systemctl disable hostapd
Set the DHCP client for the wlan0 interface
pi@d-diot:~ $ sudo nano /etc/dhcpcd.conf
Comment out (#) the following lines at the end of the file, then save and exit
- /etc/dhcpcd.conf
#interface wlan0 # static ip_address=192.168.10.1/24 # nohook wpa_supplicant
Restart the dhcp client service to load the new configuration
pi@d-diot:~ $ sudo systemctl daemon-reload pi@d-diot:~ $ sudo systemctl restart dhcpcd
Disable routing
pi@d-diot:~ $ sudo nano /etc/sysctl.conf
Comment out (#) the following line then save and exit
- /etc/sysctl.conf
#line net.ipv4.ip_forward=1
Disable Masquerade
pi@d-diot:~ $ sudo nano /etc/rc.local
Comment out (#) the following line then save and exit
- /etc/rc.local
#iptables-restore < /etc/iptables.ipv4.nat
Configure wpa supplicant
pi@d-diot:~ $ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
Add the following lines then save and exit
- /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 country=YOUR_COUNTRY network={ ssid="YOUR_NETWORK" psk="YOUR_PASSWORD" }
Change the country code, ssid and password according to your needs and then reboot the Pi
pi@d-diot:~ $ sudo reboot