Connected but without routing or ip change !! ?

Business solution to host your own OpenVPN server with web management interface and bundled clients.
Post Reply
q8_legend
OpenVpn Newbie
Posts: 6
Joined: Tue Apr 09, 2013 3:17 pm

Connected but without routing or ip change !! ?

Post by q8_legend » Wed Apr 10, 2013 10:52 am

After spending hours & hours for setting up openvpn to my DDWRT router(Wndr3700v2) & without having a chance of success. I have finally get it to be kind of working(just connected without routing, so its useless :p).. I don't know why its not routed !! the ip isn't changed at all !! just it say connected & everything is the same(I mean like its not connected at all , since it doesn't route the packet to my server !!)..

I have tried many things without any chance of luck(connecting), this is the only method(setting) that worked for me..
only using the web gui(config), when I try to use the config(command) its not working nor connected..

before posting the config for the server & the client, i just want to mention that when i'm using the default port for openvpn(1194) it won't connect at all, i don't know why !! I discovered it by trail & error :) .
so, I have to change the port to another port..

this is my server config(using GUI):
Image

This is my client config:

Code: Select all

client

dev tun

proto udp

remote xx.xx.xx.xx 1234

resolv-retry infinite

nobind

persist-key
persist-tun

ca ca.crt
cert client1.crt
key client1.key

ns-cert-type server
comp-lzo
verb 3

and this is the tutorial that worked for me(GUI method; & only connected without routing):
http://www.dd-wrt.com/wiki/index.php/OpenVPN


Note:
I'm using DD-WRT v24-sp2 (03/25/13) std;SVN revision 21061.


Thanks alot

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: Connected but without routing or ip change !! ?

Post by janjust » Wed Apr 10, 2013 10:58 am

if openvpn cannot use port 1194 then something else is running on that port - another instance of openvpn?

as for routing not working: did you specify that you want the default gateway to be redirected? can you add something like

Code: Select all

redirect-gateway def1
to the client config, reconnect , and see if routing now is working (most likely it isn't ;))

I don't know how this is done in the dd-wrt GUI, but I'd expect some options for redirecting all traffic, with or without masquerading.

q8_legend
OpenVpn Newbie
Posts: 6
Joined: Tue Apr 09, 2013 3:17 pm

Re: Connected but without routing or ip change !! ?

Post by q8_legend » Wed Apr 10, 2013 4:00 pm

janjust wrote:if openvpn cannot use port 1194 then something else is running on that port - another instance of openvpn?

as for routing not working: did you specify that you want the default gateway to be redirected? can you add something like

Code: Select all

redirect-gateway def1
to the client config, reconnect , and see if routing now is working (most likely it isn't ;))

I don't know how this is done in the dd-wrt GUI, but I'd expect some options for redirecting all traffic, with or without masquerading.
Now its connected but the internet(in the client) doesn't work at all !!, so its even worse right now :)

and about the 1194 port, I think maybe the mobile ISP(since i'm using the mobile data) is blocking that port.. just assuming :) , this is why I tried & though about changing the port number..

and by the way.. I don't mind using the config mode for setting it up.. but, every method that I tried it before failed unfortunately , & only this GUI method kind of success :( .. & this is the method that I have used for the config
http://www.dd-wrt.com/wiki/index.php/VP ... ay)_v24%2B

Thanks alot ;)

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: Connected but without routing or ip change !! ?

Post by janjust » Thu Apr 11, 2013 2:50 pm

what is it that you want to achieve? redirect all traffic via the VPN tunnel? there must be a dd-wrt tutorial out there on how to set this up ...

q8_legend
OpenVpn Newbie
Posts: 6
Joined: Tue Apr 09, 2013 3:17 pm

Re: Connected but without routing or ip change !! ?

Post by q8_legend » Sun Apr 14, 2013 2:57 pm

janjust wrote:what is it that you want to achieve? redirect all traffic via the VPN tunnel? there must be a dd-wrt tutorial out there on how to set this up ...

Yes, This is what I want.. & the methods that are available out there, didn't work with me.. I don't know why !!

I have issue with the port number(I said before), & when I change it to a different port, it works but without redirecting the traffic !! I don't know why !! Just said that its connected !!

and the method that works with me, only the GUI(with just say connected) I don't know why..

If u have a way to implement it(even using the command) plz let me know & i'm more than appreciate for that..

Thanks alot

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: Connected but without routing or ip change !! ?

Post by janjust » Mon Apr 15, 2013 10:47 am

get a shell on the dd-wrt box and run something like

Code: Select all

iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE
don't know if this will survive a reboot
(see e.g. http://my.anuson.com/knowledgebase/21/O ... D-WRT.html for details).

Post Reply