Jack Yaz
Part of the Furniture
Using guides from the wiki, I've got the below dnsmasq.postconf. My device can connect to the guest network (which is configured via the WebUI), but no internet. Can anyone help?
Code:
#!/bin/sh
CONFIG=$1
source /usr/sbin/helper.sh
logger "dnsmasq-dhcp: Configure wl0.1 to have special DHCP"
pc_append "
interface=wl0.1
dhcp-range=wl0.1,10.14.15.10,10.14.15.10,255.255.255.0,86400s
dhcp-option=wl0.1,3,10.14.15.1
dhcp-option=wl0.1,6,8.8.8.8
" /tmp/etc/dnsmasq.conf
ifconfig wl0.1 10.14.15.1 netmask 255.255.255.0
ip route show table main | grep -Ev ^default | while read ROUTE; do
ip route add table 10 $ROUTE;
done
ip route add default dev eth0 table 10
ip rule add dev wl0.1 table 10
ip route flush cache
ebtables -t broute -D BROUTING -i wl0.1 -p ipv4 -j DROP
ebtables -t broute -I BROUTING -i wl0.1 -p ipv4 -j DROP
ebtables -t broute -D BROUTING -i wl0.1 -p arp -j DROP
ebtables -t broute -I BROUTING -i wl0.1 -p arp -j DROP
iptables -D INPUT -i wl0.1 -m state --state NEW -j ACCEPT
iptables -I INPUT -i wl0.1 -m state --state NEW -j ACCEPT
iptables -D FORWARD -i wl0.1 -o eth0 -j ACCEPT
iptables -I FORWARD -i wl0.1 -o eth0 -j ACCEPT
iptables -t nat -D POSTROUTING -s 10.14.15.0/24 -o eth0 -j MASQUERADE
iptables -t nat -I POSTROUTING -s 10.14.15.0/24 -o eth0 -j MASQUERADE