Skip to content
Permalink
Browse files

small fix for joustmania AP, still needs work

  • Loading branch information...
adangert committed May 13, 2019
1 parent 46d9a5a commit b19c9e14062ef81c231720108462a82d205c336e
Showing with 12 additions and 8 deletions.
  1. +1 −1 apfiles/rc.local
  2. +11 −7 enable_ap.sh
@@ -18,7 +18,7 @@ if [ "$_IP" ]; then
fi

#Access point for JoustMania
#iptables-restore < /etc/iptables.ipv4.nat
iptables-restore < /etc/iptables.ipv4.nat
#hostapd /etc/hostapd/hostapd.conf

sleep 5
@@ -47,20 +47,24 @@ cp ./apfiles/interfaces /etc/network/interfaces
#sudo service dhcpcd restart
#ifdown wlan0; ifup wlan0

#mv /etc/sysctl.conf /etc/sysctl.conf.bak
#cp ./apfiles/sysctl.conf /etc/sysctl.conf
mv /etc/sysctl.conf /etc/sysctl.conf.bak
cp ./apfiles/sysctl.conf /etc/sysctl.conf

#updates for allowing joustmania to work
#echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
#echo 1 > /proc/sys/net/ipv4/ip_forward
#iptables -t nat -A POSTROUTING -s 172.24.1.0/24 ! -d 172.24.1.0/24 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.3.141.0/24 ! -d 10.3.141.0/24 -j MASQUERADE
#iptables-save > /etc/iptables/rules.v4
#sh -c "iptables-save > /etc/iptables.ipv4.nat"

#iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
#iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
#iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT
#sh -c "iptables-save > /etc/iptables.ipv4.nat"
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
#iptables -A FORWARD -i eth0 -o uap0 -m state --state RELATED,ESTABLISHED -j ACCEPT


iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT
#iptables -A FORWARD -i uap0 -o eth0 -j ACCEPT
sh -c "iptables-save > /etc/iptables.ipv4.nat"

mv /etc/rc.local /etc/rc.local.bak
cp ./apfiles/rc.local /etc/rc.local

0 comments on commit b19c9e1

Please sign in to comment.
You can’t perform that action at this time.