Zde můžete vidět rozdíly mezi vybranou verzí a aktuální verzí dané stránky.
Obě strany předchozí revizePředchozí verze | |||
pitel:projekty:ddwrtguestwifi [17. 10. 2015, 11.17:41] – typos pitel | pitel:projekty:ddwrtguestwifi [30. 12. 2022, 13.43:01] (aktuální) – upraveno mimo DokuWiki 127.0.0.1 | ||
---|---|---|---|
Řádek 1: | Řádek 1: | ||
+ | ====== Guest Wi-Fi with DD-WRT ====== | ||
+ | There are plenty of howtos about that, but none of them seems to match current state of DD-WRT firmware. So I decided to write my own. | ||
+ | {{ https:// | ||
+ | |||
+ | < | ||
+ | |||
+ | ===== Adding virtual interface ===== | ||
+ | - Go to // | ||
+ | - Name your new network and check //Advanced Settings//. | ||
+ | - Switch //Network Configuration// | ||
+ | - Enable //Network Isolation// and set //IP Address// and //Subnet Mask// to something other then your home network. | ||
+ | - //Save// & //Apply Settings//. | ||
+ | |||
+ | {{ iface.png }} | ||
+ | |||
+ | You should now see the network, but you will have to manualy set IP address and you will get no internet. | ||
+ | |||
+ | ===== DHCP ===== | ||
+ | - Go to //Setup// → // | ||
+ | - Choose your new interface (shuld be something like '' | ||
+ | - //Save// & //Apply Settings//. | ||
+ | |||
+ | {{ dhcp.png }} | ||
+ | |||
+ | You should now get assigned IP address after connecting to the network. But still no internet. | ||
+ | |||
+ | ===== Firewall ===== | ||
+ | - Go to // | ||
+ | - //Save// & //Apply Settings//. | ||
+ | |||
+ | <code bash> | ||
+ | iptables -I FORWARD -i ath0.1 -d `nvram get lan_ipaddr`/ | ||
+ | iptables -t nat -I POSTROUTING -o br0 -s 10.0.0.0/24 -j MASQUERADE | ||
+ | iptables -I INPUT -i ath0.1 -j logdrop | ||
+ | iptables -I INPUT -i ath0.1 -p udp --dport 67 -j ACCEPT | ||
+ | iptables -I INPUT -i ath0.1 -p udp --dport 53 -j ACCEPT | ||
+ | iptables -I INPUT -i ath0.1 -p tcp --dport 53 -j ACCEPT | ||
+ | </ | ||
+ | |||
+ | <note important> | ||
+ | |||
+ | It enables port forwarding, but disable access from guest network to your home network, except DNS and DHCP. | ||
+ | |||
+ | You should now have separate Wi-Fi network with internet access. |