Page 1 of 1

Connected but without routing or ip change !! ?

Posted: Wed Apr 10, 2013 10:52 am
by q8_legend
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

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

Posted: Wed Apr 10, 2013 10:58 am
by janjust
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.

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

Posted: Wed Apr 10, 2013 4:00 pm
by q8_legend
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 ;)

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

Posted: Thu Apr 11, 2013 2:50 pm
by janjust
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 ...

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

Posted: Sun Apr 14, 2013 2:57 pm
by q8_legend
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

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

Posted: Mon Apr 15, 2013 10:47 am
by janjust
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).