Skip to content

Commit

Permalink
small fix for joustmania AP, still needs work
Browse files Browse the repository at this point in the history
  • Loading branch information
adangert committed May 13, 2019
1 parent 46d9a5a commit b19c9e1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion apfiles/rc.local
Expand Up @@ -18,7 +18,7 @@ if [ "$_IP" ]; then
fi fi


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


sleep 5 sleep 5
Expand Down
18 changes: 11 additions & 7 deletions enable_ap.sh
Expand Up @@ -47,20 +47,24 @@ cp ./apfiles/interfaces /etc/network/interfaces
#sudo service dhcpcd restart #sudo service dhcpcd restart
#ifdown wlan0; ifup wlan0 #ifdown wlan0; ifup wlan0


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


#updates for allowing joustmania to work #updates for allowing joustmania to work
#echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf #echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
#echo 1 > /proc/sys/net/ipv4/ip_forward #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 #iptables-save > /etc/iptables/rules.v4
#sh -c "iptables-save > /etc/iptables.ipv4.nat" #sh -c "iptables-save > /etc/iptables.ipv4.nat"


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

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 mv /etc/rc.local /etc/rc.local.bak
cp ./apfiles/rc.local /etc/rc.local cp ./apfiles/rc.local /etc/rc.local
Expand Down

0 comments on commit b19c9e1

Please sign in to comment.