謝謝以下的reference:
http://www.howtogeek.com/forum/topic/how-to-install-and-configure-openvpn-on-your-dd-wrt-router
記憶中對上一次成功還有兩件事, 一是DNSMASQ的問題, 另一個是Firewall.
有睇之前的references, 也了解要set iptables, 這是理所當然.
Reference 5只是有以下的setting:
iptables -I INPUT -p tcp --dport 631 -j ACCEPT iptables -I INPUT -p udp --dport 631 -j ACCEPT iptables -I FORWARD 1 --source 192.168.60.0/24 -j ACCEPT iptables -I FORWARD -i br0 -o tun0 -j ACCEPT iptables -I FORWARD -i tun0 -o br0 -j ACCEPT
但這是不足的, 還是做NAT:
iptables -t nat -A POSTROUTING -s 192.168.60.0/24 -o vlan2 -j SNAT --to-source $(nvram get wan_ipaddr)
把所有的traffic 轉出去.
至於DNSMASQ,
Local DNS要打開, No DNS Rehind disable, Additional DNSMasq Options: interface=tun0
好奇怪, 曾telnet入去睇, DNSMASQ default start at tun but not tun!!!
Happy to use it now!!!!
No comments:
Post a Comment