Slater1601
OK I posted this in another thread but I've since changed my configuration a lot and acutally got the primary goal listed below working. I decided it best to stick with up to date firmware and configuration syntax if I want to get this functioning well. So I've now configured the tunnel between two DDWRT routers with the GUI rather then the startup scripts. All my config is below. I now have end to end connectivity between hosts on each lan subnet. However, I can't seem to get working Internet across the VPN. Basically for now I want to send all my Internet bound traffic across the tunnel and out NetworkA's Internet pipe. Then when I get that working I'd like to fine tune it with the "Secondary Goal" listed below. When I enable "redirect remote gateway" on the server I lose ALL internet access. I've tried combinations of a ton of things from other posts I've read and nothing seems to be working.
Goal:
Simple. I want to have end to end connectivity between my Dad's LAN subnet (Let's call it Network A), and mine (Let's call it Network B). I had to use the CCD directory and the iroute command to make this work. Otherwise the routers could ping each other but not the hosts on the lan segments.
Secondary Goal (if possible):
I'd like to set a rule on my router that says all traffic from hosts A, B, and C on NetworkB get encrypted and sent across to use NetworkA's Internet pipe, all other hosts use the Internet as normal.
##################################################################
Network A:
Linksys E1000 v1 DD-WRT v24-sp2 (12/24/10) vpn-small - build 15962
Time Warner Cable
LAN Subnet 192.168.10.0 /24
##OpenVPN ConfigA##
dh /tmp/openvpn/dh.pem
ca /tmp/openvpn/ca.crt
cert /tmp/openvpn/cert.pem
key /tmp/openvpn/key.pem
keepalive 10 120
verb 3
mute 3
syslog
writepid /var/run/openvpnd.pid
management 127.0.0.1 14
management-log-cache 100
topology subnet
script-security 2
port 1194
proto udp
cipher bf-cbc
auth sha1
client-config-dir /tmp/openvpn/ccd
comp-lzo no
tls-server
ifconfig-pool-persist /tmp/openvpn/ip-pool 86400
tls-cipher AES128-SHA
fast-io
tun-mtu 1500
mtu-disc yes
server 10.0.0.0 255.255.255.0
dev tun2
tun-ipv6
push "route 192.168.10.0 255.255.255.0"
route 192.168.1.0 255.255.255.0
Startup Commands:
(THIS WAS THE ONLY WAY I COULD GET THE DEVICES ON EACH SIDE TO BE ABLE TO COMMUNICATE)
cd /tmp/openvpn/ccd
echo "
iroute 192.168.1.0 255.255.255.0
" > CLIENT1
Firewall Commands:
iptables -I INPUT -p udp --dport 1194 -j ACCEPT
iptables -I FORWARD -i br0 -o tun2 -j ACCEPT
iptables -I FORWARD -i tun2 -o br0 -j ACCEPT
iptables -I INPUT 3 -i tun2 -p icmp -j ACCEPT
##################################################################
##################################################################
Network B:
Linksys E1000 v1 DD-WRT v24-sp2 (12/24/10) vpn-small - build 15962
Time Warner Cable
LAN Subnet 192.168.1.0 /24
##OpenVPN ConfigB##
ca /tmp/openvpncl/ca.crt
cert /tmp/openvpncl/client.crt
key /tmp/openvpncl/client.key
management 127.0.0.1 16
management-log-cache 100
verb 3
mute 3
syslog
writepid /var/run/openvpncl.pid
client
resolv-retry infinite
nobind
persist-key
persist-tun
script-security 2
dev tun1
proto udp
cipher bf-cbc
auth sha1
remote RouterA.no-ip.org 1194
comp-lzo no
tls-client
tun-mtu 1500
mtu-disc yes
ns-cert-type server
fast-io
tun-ipv6
tls-cipher AES128-SHA
Firewall Commands:
iptables -I INPUT -p udp --dport 1194 -j ACCEPT
iptables -I FORWARD -i br0 -o tun1 -j ACCEPT
iptables -I FORWARD -i tun1 -o br0 -j ACCEPT
iptables -I INPUT 3 -i tun1 -p icmp -j ACCEPT
##################################################################
At this point I've devoted so much time to this that I could have bought a couple TZ100's an just used IPSEC lol. But now this is a mission! Any help would be greatly appreciated!