Developing lightweight computation at the DSG edge

Commit 2b3b0a36 authored by Agustí Moll Garcia's avatar Agustí Moll Garcia
Browse files

Fixed error in firewall.user generator

parent 052123d1
......@@ -2,7 +2,7 @@
cat /etc/qmp/qmp.banner >> /etc/banner
echo "Versio ratafia 1.0 (Sat Oct 29 2011) ---------------" >> /etc/banner
echo "Ratafia Recipe: http://en.wikipedia.org/wiki/Ratafia
echo "Ratafia Recipe: http://en.wikipedia.org/wiki/Ratafia" >> /etc/banner
echo "----------------------------------------------------" >> /etc/banner
#!/bin/sh
cat << QMP >> /etc/firewall
IPLOCAL="$(uci get qmp.networks.lan_address)"
cat << QMP >> /etc/firewall.user
IPLOCAL="\$(uci get qmp.networks.lan_address)"
/usr/sbin/iptables -t nat -N captive-portal
/usr/sbin/iptables -t nat -A PREROUTING -i br-lan ! -d $IPLOCAL -j captive-portal
/usr/sbin/iptables -t nat -A captive-portal -p tcp --destination-port 80 -j DNAT --to-destination ${IPLOCAL}:8888
/usr/sbin/iptables -t nat -I PREROUTING -i br-lan ! -d \${IPLOCAL} -j captive-portal
/usr/sbin/iptables -t nat -A captive-portal -p tcp --destination-port 80 -j DNAT --to-destination \${IPLOCAL}:8888
QMP
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment