Skip to content

Instantly share code, notes, and snippets.

@ianschenck
Created August 3, 2016 07:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ianschenck/ff56f79bf6587e6bbc8c29c2704d2297 to your computer and use it in GitHub Desktop.
Save ianschenck/ff56f79bf6587e6bbc8c29c2704d2297 to your computer and use it in GitHub Desktop.
Captive Portal on TP-Link TL-WA7210N using CHAOS CALMER (15.05.1, r48532), Files under /etc/config/
config dnsmasq
option domainneeded '1'
option boguspriv '1'
option filterwin2k '0'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option nonegcache '0'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.auto'
option localservice '1'
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv6 'server'
option ra 'server'
option ra_management '1'
config dhcp 'wan'
option interface 'wan'
option ignore '1'
config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'
config dhcp 'wifi'
option start '100'
option limit '150'
option interface 'wifi'
option leasetime '2h'
option ra 'server'
option dhcpv6 'server'
option ra_management '1'
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fdc7:72d4:a7dc::/48'
config interface 'lan'
option force_link '1'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
option _orig_ifname 'wlan0'
option _orig_bridge 'true'
config interface 'wan'
option proto 'dhcp'
option ifname 'eth0'
config interface 'wifi'
option _orig_ifname 'wlan0-1'
option _orig_bridge 'false'
option proto 'static'
option ipaddr '10.10.15.1'
option netmask '255.255.255.0'
config instance
# Set to 1 to enable nodogsplash
option enabled 1
# Use plain configuration file as well
#option config '/etc/nodogsplash/nodogsplash.conf'
option network 'wifi'
option gatewayname 'OpenWrt Nodogsplash'
option maxclients '250'
option idletimeout '1200'
# Your router may have several interfaces, and you
# probably want to keep them private from the network/gatewayinterface.
# If so, you should block the entire subnets on those interfaces, e.g.:
list authenticated_users 'block to 192.168.0.0/16'
list authenticated_users 'block to 10.0.0.0/8'
# Typical ports you will probably want to open up.
list authenticated_users 'allow tcp port 22'
list authenticated_users 'allow tcp port 53'
list authenticated_users 'allow udp port 53'
list authenticated_users 'allow tcp port 80'
list authenticated_users 'allow tcp port 443'
# For preauthenticated users to resolve IP addresses in their
# initial request not using the router itself as a DNS server,
list preauthenticated_users 'allow tcp port 53'
list preauthenticated_users 'allow udp port 53'
# Allow ports for SSH/Telnet/DNS/DHCP/HTTP/HTTPS
list users_to_router 'allow tcp port 22'
list users_to_router 'allow tcp port 23'
list users_to_router 'allow tcp port 53'
list users_to_router 'allow udp port 53'
list users_to_router 'allow udp port 67'
list users_to_router 'allow tcp port 80'
list users_to_router 'allow tcp port 443'
# See https://github.com/nodogsplash for a full list of available options.
config wifi-device 'radio0'
option type 'mac80211'
option channel '11'
option hwmode '11g'
option path 'platform/ar933x_wmac'
option htmode 'HT20'
option txpower '12'
option country 'US'
config wifi-iface
option device 'radio0'
option mode 'ap'
option ssid 'Disorient'
option network 'lan'
option encryption 'psk2'
option key 'trazadone'
config wifi-iface
option device 'radio0'
option mode 'ap'
option encryption 'none'
option ssid 'Disorient-Public-Wifi'
option network 'wifi'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment