What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

SSID with custom DHCP subnet - internet doesn't work

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
 
Are you sure your append works? I have not tried it for fear I break mine.
But a proper approach would be as the example given in the wiki:
Code:
CONFIG=$1
pc_append interface=wl0.1 $CONFIG
...

On second thought, yours might actually work as you only append, not replace.
 
Are you sure your append works? I have not tried it for fear I break mine.
But a proper approach would be as the example given in the wiki:
Code:
CONFIG=$1
pc_append interface=wl0.1 $CONFIG
...

On second thought, yours might actually work as you only append, not replace.
I've nano'd the updated conf file in etc and seems to be OK
 
Which works, but DHCP is serving me .184, when the pool starts at .2, so I must have a conflict somewhere
The address you get is based on a hash of the mac address.....it doesn't run sequentially in the pool range.
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top