marke08
Hey all, I have a WNDR3700v3 with DD-WRT installed I have gotten OpenVPN up and almost running. I am able to connect to the VPN but cannot get to the internet or ping 8.8.8.8 while connected. I'm able to connect without any errors in the client log file or the server log file. . My Lan is 192.168.2.1 and my VPN is 10.0.8.0
Client file:
remote domain 1194
client
remote-cert-tls server
dev tun0
proto udp
resolv-retry infinite
nobind
comp-lzo yes
push "comp-lzo yes"
persist-key
persist-tun
float
route-delay 30
ca ca.crt
cert client1.crt
key client1.key
#cipher BF-CBC
#AUTHENTICATION
auth MD5
# TOPOLOGY
#topology subnet
#MAXIMUM TRANSMISSION UNIT
link-mtu 1537
Server Config:
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 md5
client-config-dir /tmp/openvpn/ccd
comp-lzo adaptive
tls-server
ifconfig-pool-persist /tmp/openvpn/ip-pool 86400
client-to-client
push "redirect-gateway def1"
fast-io
tun-mtu 1500
mtu-disc yes
server 10.0.8.0 255.255.255.0
dev tun2
tun-ipv6
push "route 192.168.2.0 255.255.255.0"
push "dhcp-option DNS 192.168.2.1"
server 10.0.8.0 255.255.255.0
and finally Firewall settings:
iptables -I INPUT 1 -p udp --dport 1194 -j ACCEPT
iptables -I FORWARD 1 --source 10.0.8.0/24 -j ACCEPT
iptables -I FORWARD -i br0 -o tun0 -j ACCEPT
iptables -I FORWARD -i tun0 -o br0 -j ACCEPT
iptables -t nat -A POSTROUTING -s 10.0.8.0/24 -o br0 -j MASQUERADE
Any tips?
maikcat
can you access local resources or router itself via vpn?
what OS your client has?
Michael.
marke08
hey Michael, I am able to access the server admin and ping internal ip addresses while connected to the vpn. I just can't get anything on the interwebs. I'm connecting through two different clients both running on android openvpn app
maikcat
what is the output of
tracert 8.8.8.8
from your client when connected?
is your ethernet interface (openvpn server) named br0?
Michael.
marke08
Thanks for the feedback, I was able to get everything functioning by removing -o br0 from the post routing statement. Now i have a new challenge if you are interested....
I have an OpenVPN server set up on my DD-WRT router. I am able to connect and tunnel all traffic through the VPN. I can access the internet and internal resources while connected via client. However, i can only do this if the vpn network is different than the default gateway. Currently VPN = 10.0.8.0 and Gateway = 192.168.2.0.
Is it possible to get the VPN address range within the same range as the gateway? I need my VPN address to match in the first three locations to use some services in my home.
Setup is identical to my post above with the exception of what i deleted.