Original by chriscook8 from esp8266.com I just modified to use ESP8266WebServer library for easy to handle the http request.
This is sample code not yet complete.
- when Wifi connected need to close the softAP.
| add chain=input comment="Router: Allow established connections" connection-state=established | |
| add chain=input comment="Router: Allow related connections" connection-state=related | |
| add chain=input comment="Router: Allow IPv6 ICMP" protocol=icmpv6 | |
| add action=drop chain=input comment="Drop everything else" | |
| add chain=forward comment="LAN: Allow established connections" connection-state=established | |
| add chain=forward comment="LAN: Allow related connections" connection-state=related | |
| add chain=forward comment="LAN: Allow IPv6 ICMP" protocol=icmpv6 | |
| #example rule for opening port | |
| add chain=forward comment="LAN: Allow SSH" dst-port=22 protocol=tcp | |
| add chain=forward comment="Allow any to internet" out-interface=sixbone |
| $(document).ready(function() { | |
| // Support for AJAX loaded modal window. | |
| // Focuses on first input textbox after it loads the window. | |
| $('[data-toggle="modal"]').click(function(e) { | |
| e.preventDefault(); | |
| var url = $(this).attr('href'); | |
| if (url.indexOf('#') == 0) { | |
| $(url).modal('open'); | |
| } else { |