diff --git a/wifi-init.sh b/wifi-init.sh new file mode 100644 index 0000000..f5e8959 --- /dev/null +++ b/wifi-init.sh @@ -0,0 +1,7 @@ +#!/bin/bash +#Configure the current machine as a wireless access point +echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.conf && sysctl -p +ip addr add 192.168.2.1/24 dev wlp2s0 && ip link set wlp2s0 up +iptables-save && iptables-restore < /etc/iptables/rules-save +dnsmasq && hostapd -B /etc/hostapd/hostapd.conf +iptables -P FORWARD ACCEPT \ No newline at end of file