blaser DD-WRT Guru
Joined: 16 Jul 2006 Posts: 525
|
Posted: Thu Jul 29, 2010 23:48 Post subject: openvpn sucess |
|
I was trying for a long time to configure openvpn server on my router without success, finally got it to work with my home as the default gateway.
Using BS release 14684 openvpn_small on wrt160n v3.
Here is my configuration:
openvpn.conf
Code: |
mode server
tls-server
port 1194
proto tcp-server
dev tap0
ca /tmp/openvpn/ca.crt
cert /tmp/openvpn/cert.pem
key /tmp/openvpn/key.pem
dh /tmp/openvpn/dh.pem
server-bridge 192.168.1.1 255.255.255.0 192.168.1.100 192.168.1.105
push "redirect-gateway def1"
push "dhcp-option DNS your-dns-here"
push "dhcp-option DNS another-dns-here"
client-to-client
daemon
keepalive 10 120
tls-auth /tmp/openvpn/ta.key 0
cipher BF-CBC
comp-lzo
persist-key
persist-tun
verb 0
|
rc_startup
Code: |
openvpn --mktun --dev tap0
brctl addif br0 tap0
ifconfig tap0 0.0.0.0 promisc up
|
rc_firewall
Code: |
#iptables -A INPUT -i tap0 -j ACCEPT
#iptables -A INPUT -i br0 -j ACCEPT
#iptables -A FORWARD -i br0 -j ACCEPT
iptables -t nat -I PREROUTING -p tcp --dport 1194 -d 192.168.1.1 -j ACCEPT
iptables -I INPUT -p tcp --dport 1194 -j ACCEPT
|
I removed the first 3 lines in rc_firewall, they are not needed. _________________ Netgear R9000 main router
RAX80 as AP |
|