alzhao
2
I have a question about the DHCP relay.
Now the guest is having 192.168.0.x domain and your openvpn server’s subnet is 172.16.x.x, so actually the dhcp is not relayed.
If you just want two network for your private network and guest and don’t need dhcp relay, all these things can be done in the MiFi part.
Three things to do.
- Create a network for guest
Either do this in Luci or just edit /etc/config/network part, find “config interface lan” and duplicate this part, it should be like
config interface lan_guest
option proto static
option ipaddr '192.168.0.1'
option netmask '255.255.255.0'
2. Create guest wifi network.
Either do this in Luci or just edit /etc/config/wireless, find the ap part and copy it. The content should be like
config wifi-iface 'guest'
option device 'radio0'
option network 'lan_guest'
option mode 'ap'
option encryption 'psk2'
option key 'goodlife'
option ifname 'wlan1'
3. Create the dhcp server config
Either do this in Luci or just edit /etc/config/dhcp, find the part “lan” and duplicate it, content should be like
config dhcp 'guest'
option interface 'lan_guest'
option start '100'
option limit '150'
option leastime '12h'
option ra 'server'
4. Route guest traffic
edit /etc/config/firewall or do it in luci, add rule for guest to the end
config rule 'guest'
option src 'lan_guest'
option dest 'VPN_client' #If you don't want guest to use vpn, here should be " option dest 'wan' "
option proto 'udp tcp'
option target 'ACCEPT'
5. Finally reboot your device. If you do this in Luci, there changes should be applied automatically, no need reboot.