Last active
December 7, 2016 00:52
-
-
Save AGhost-7/20890c4dea18e0daa9dd7ee0cdcc150f to your computer and use it in GitHub Desktop.
Turning my gaming rig into a wifi router
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface=lo,wlx00904c0e8123 | |
no-dhcp-interface=lo | |
dhcp-range=192.168.8.20,192.168.8.254,255.255.255.0,12h |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To find interface run: `ip link | grep -E '^w'` | |
interface=wlx00904c0e8123 | |
#interface=wlan0 | |
ssid=chocolate-bars-for-everyone | |
driver=nl80211 | |
ieee80211n=1 | |
wmm_enabled=1 | |
ht_capab=[HT40][GF][SHORT-GI-40][SHORT-GI-20] | |
hw_mode=g | |
wpa=2 | |
wpa_passphrase=passwordlol | |
wpa_key_mgmt=WPA-PSK WPA-EAP WPA-PSK-SHA256 WPA-EAP-SHA256 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install hostapd dnsmasq -y | |
zcat /usr/share/doc/hostapd/examples/hostapd.conf.gz | sudo tee -a /etc/hostapd/hostapd.conf | |
sudo vim /etc/hostapd/hostapd.conf | |
sudo vim /etc/network/interfaces | |
sudo vim /etc/dnsmasq.conf | |
echo 'net.ipv4.ip_forward=1' | sudo tee -a /etc/sysctl.conf | |
sudo vim /etc/rc.local |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# interfaces(5) file used by ifup(8) and ifdown(8) | |
auto lo | |
iface lo inet loopback | |
auto wlx00904c0e8123 | |
iface wlx00904c0e8123 inet static | |
hostapd /etc/hostapd/hostapd.conf | |
address 192.168.8.1 | |
netmask 255.255.255.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#sudo ip link set dev wlx00904c0e8123 up | |
sudo ifconfig wlx00904c0e8123 up | |
sudo iptables -t nat -A POSTROUTING -s 192.168.8.0/24 ! -d 192.168.8.0/24 -j MASQUERADE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment