OpenVPN config docs for v24 SP1?

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3 ... 20, 21, 22, 23, 24  Next
Author Message
sos
DD-WRT Novice


Joined: 12 Mar 2010
Posts: 10

PostPosted: Wed Mar 17, 2010 9:45    Post subject: Reply with quote
thanks micleeso - seems to be working fine, with no errors from within the LAN. I'll take her for a spin and try from the WAN tomorrow. Still no dice with NetworkManager though - same 'times out' error with the TLS handshake failing.

@McKayCR - not sure how much memory 'management localhost 5001' option uses, but it doesn't seem to be much from what I can see. Can always set verb to '0' I suppose.
Sponsor
sos
DD-WRT Novice


Joined: 12 Mar 2010
Posts: 10

PostPosted: Wed Mar 17, 2010 18:11    Post subject: Reply with quote
Su-weeeet!

Currently posting this from an airport wireless hotspot routing my connection (automatically) using NetworkManager through my openVPN tunnel - look ma, no proxy or putty! Confirmed the correct routing using whatismyip.

Successfully mounted shares on my home PC and accessed the router via the 'LAN'. Excellent, just what I was wanting!

It seemed NetworkManager was choking on being inside the LAN while trying to run the VPN connection, but outside, connects just fine (as does the terminal), essentially using micleeso's configs - but I don't doubt McKayCR's would work too. My apologies to NetworkManager (although a more helpful error message would have been nice!).

Colour me pleased!! Smile
McKayCR
DD-WRT Novice


Joined: 05 Sep 2009
Posts: 36
Location: Maryland

PostPosted: Fri Mar 19, 2010 0:05    Post subject: Reply with quote
SOS, sorry I didn't get back to you, I tried to export my networkmanager configs so we could compare notes, but I keep getting an error. And since I'm a linux noob, I didn't know where to manually find the configs. Glad you hear you got it to work though.
sos
DD-WRT Novice


Joined: 12 Mar 2010
Posts: 10

PostPosted: Fri Mar 19, 2010 1:47    Post subject: Reply with quote
Hmmmm. Close but not quite the banana!!

Now at a motel behind their wireless network. I can putty / ssh to my home router, and run firefox over the ssh connection using a SOCKS proxy, confimed with whatismyip. Good.

OpenVPN connects successfully using both the terminal and NetworkManager. I can browse files on my desktop at home from my laptop here at the motel. However, I can't browse the internet over the openVPN tunnel, as it times out when: "Looking up gmail.com..."

I suspect this is a gateway / DNS issue. If I can get this to work it'll be 100%. Configs as above. I tried adding:

[EDIT] All working now over the tunnel, using NetworkManager and the terminal.

Made the changes suggested here: http://www.wains.be/index.php/2008/07/18/openvpn-routing-all-traffic-through-the-vpn-tunnel/

All is well in my openVPN world :)

Relevant sections from server config:

Code:

duplicate-cn
push "route 192.168.1.0 255.255.255.0"
server 10.11.12.0  255.255.255.0
mode server
tls-server
port 1194
proto udp
dev tun0
push "dhcp-option DOMAIN xxxx.dyndns.org.local"
push "dhcp-option DNS 58.28.5.2"
push "redirect-gateway def1"
client-to-client


and lastly, firewall settings:
Code:

iptables -I INPUT 1 -p udp --dport 1194 -j ACCEPT
iptables -I FORWARD 1 --source 10.11.12.0/24 -j ACCEPT
iptables -I FORWARD -i br0 -o tun0 -j ACCEPT
iptables -I FORWARD -i tun0 -o br0 -j ACCEPT
iptables -I INPUT -i tun0 -j ACCEPT
insmod ipt_webstr
ln -s /dev/null /tmp/exec.tmp
iptables -D INPUT -p tcp -m tcp -m webstr --url cgi-bin -j REJECT --reject-with tcp-reset
iptables -I INPUT -p tcp -m tcp -m webstr --url cgi-bin -j REJECT --reject-with tcp-reset
echo "1" > /proc/sys/net/ipv4/ip_forward

iptables -t nat -A POSTROUTING -s 10.11.12.0/24 -o eth0 -j MASQUERADE


I'm not sure what some of these settings do and whether any are redundant, but it ain't broke!
keamas
DD-WRT Novice


Joined: 13 Jul 2007
Posts: 17

PostPosted: Thu Jun 10, 2010 7:22    Post subject: How to use OpenVPN behind a nother Router ? Reply with quote
Hi I don't have my DD-WRT directly connected to the internet so I use the LAN Ports
It lookes like this:

Internet<-- PPOE -->Netgear Router <-- LAN --> WRT-45GL (DD-WRT OpenVPN)

Is it able to use openVPN in this scenario ?
What do I have to do ? To get it work ?
somms
DD-WRT User


Joined: 21 Mar 2008
Posts: 261

PostPosted: Thu Jun 10, 2010 16:53    Post subject: Re: How to use OpenVPN behind a nother Router ? Reply with quote
keamas wrote:
Hi I don't have my DD-WRT directly connected to the internet so I use the LAN Ports
It lookes like this:

Internet<-- PPOE -->Netgear Router <-- LAN --> WRT-45GL (DD-WRT OpenVPN)

Is it able to use openVPN in this scenario ?
What do I have to do ? To get it work ?


http://www.dd-wrt.com/phpBB2/viewtopic.php?t=54884

_________________


Member of the Professional Aviation Safety Specialists Union!
Mario67
DD-WRT Novice


Joined: 13 Jun 2010
Posts: 4

PostPosted: Sun Jun 13, 2010 15:34    Post subject: Reply with quote
I followed the article from the wiki/this thread but ran into trouble. Hope someone here can give me a hint how to solve it.

I've made the steps from the wiki exactly to configure my WRT54GL and made sure i had enough NVRAM storage to begin with (before I start I reset the router to factory defaults). Certificates are made and pasted into the webpage, server config file is created, firewall configured and all settings are saved.
With these things in place i go to the services page and click on "apply settings", right after that my router crashes.

The PC I use for configuration is connected to the lan side and i notice the following symptoms, while doing a ping to the router:
- i reset the router manually
- after a while it comes up
- ping replies for about 20 seconds
- after that, no replies are received anymore

The only way to get my router alive is go back to factory defaults and i have to go all over again.

So far I used the v24-sp2 version (build 13064) and v24-sp1 (build 10020) but both gave the same results.

Since I only got about 20 seconds to get a connection to the router and i'm not linux-savvy enough i didn't try troubleshooting steps from telnet so far.

So anyone got a hint where to start ?

[EDIT] i pinpointed the problem a little further; i can configure anything i want and save/apply settings, until i change the VPN daemon from the setting start type "system" to "wan up", when i do this (after saving/applying), i lose connection to the router after about 20 seconds and the only way to get control of the router is to do a hard reset.

[EDIT2] This is really weird; i've read all the pages from this thread and noticed that just like some other guys experienced, i had no directory \tmp\openvpn on my router. I've pushed the save button a few times and after that this directory, with the data in it was created !
After that i changed the start type setting to "wan up" and it didn't crash ! So far as i can see now, the openvpn process runs (ps|grep openvpn).

Well, time for round 2 now ! :)

[EDIT3-Last one] Well I gave up; although it seemed i got the VPN server running i haven't been able to connect through a client. Furthermore, the most basic kind of administration, in my case adding ip-reservations for devices in my network that needed static ip's, resulted in a crashed router which only could be revived by going back to factory defaults. Sad
Just flashed my router again with regular firmware and it seems i have to live without VPN. Well, let's have a look what logmein.com has to offer for me instead...


Last edited by Mario67 on Sat Jun 19, 2010 14:51; edited 1 time in total
concretenomad
DD-WRT Novice


Joined: 21 Sep 2006
Posts: 9

PostPosted: Sat Jun 19, 2010 0:00    Post subject: Reply with quote
I am having trouble getting my install to work. I started a thread here. http://www.dd-wrt.com/phpBB2/viewtopic.php?t=74153

Any advice?
bigjess007
DD-WRT Novice


Joined: 24 Jun 2010
Posts: 7

PostPosted: Thu Jun 24, 2010 7:36    Post subject: Reply with quote
sos wrote:
Hmmmm. Close but not quite the banana!!

Now at a motel behind their wireless network. I can putty / ssh to my home router, and run firefox over the ssh connection using a SOCKS proxy, confimed with whatismyip. Good.

OpenVPN connects successfully using both the terminal and NetworkManager. I can browse files on my desktop at home from my laptop here at the motel. However, I can't browse the internet over the openVPN tunnel, as it times out when: "Looking up gmail.com..."

I suspect this is a gateway / DNS issue. If I can get this to work it'll be 100%. Configs as above. I tried adding:

[EDIT] All working now over the tunnel, using NetworkManager and the terminal.

Made the changes suggested here: http://www.wains.be/index.php/2008/07/18/openvpn-routing-all-traffic-through-the-vpn-tunnel/

All is well in my openVPN world :)

Relevant sections from server config:

Code:

duplicate-cn
push "route 192.168.1.0 255.255.255.0"
server 10.11.12.0  255.255.255.0
mode server
tls-server
port 1194
proto udp
dev tun0
push "dhcp-option DOMAIN xxxx.dyndns.org.local"
push "dhcp-option DNS 58.28.5.2"
push "redirect-gateway def1"
client-to-client


and lastly, firewall settings:
Code:

iptables -I INPUT 1 -p udp --dport 1194 -j ACCEPT
iptables -I FORWARD 1 --source 10.11.12.0/24 -j ACCEPT
iptables -I FORWARD -i br0 -o tun0 -j ACCEPT
iptables -I FORWARD -i tun0 -o br0 -j ACCEPT
iptables -I INPUT -i tun0 -j ACCEPT
insmod ipt_webstr
ln -s /dev/null /tmp/exec.tmp
iptables -D INPUT -p tcp -m tcp -m webstr --url cgi-bin -j REJECT --reject-with tcp-reset
iptables -I INPUT -p tcp -m tcp -m webstr --url cgi-bin -j REJECT --reject-with tcp-reset
echo "1" > /proc/sys/net/ipv4/ip_forward

iptables -t nat -A POSTROUTING -s 10.11.12.0/24 -o eth0 -j MASQUERADE


I'm not sure what some of these settings do and whether any are redundant, but it ain't broke!



I'm hoping someone can help. I'm trying to do a ethernet bridging vpn AND route all the internet traffic over the vpn. I've gotten the vpn up and running with a bridge configuration but it won't send all the traffic through the vpn. I tried to make the changes sos referenced above but can't seem to get it right. It seems to be either bridge no all routing or all routing no bridge.

Can someone advise? Thanks!!
cag0331
DD-WRT Novice


Joined: 16 Jun 2010
Posts: 8
Location: Cleveland, Ohio, USA

PostPosted: Fri Jun 25, 2010 17:13    Post subject: ca.crt not saving? Reply with quote
Is anyone having trouble getting their ca.crt to save? Using the webgui on a linksys wrt610n v1 running DD-WRT v24-sp2 (06/12/10) vpn - build 14594, I fill in all the boxes in the OpenVPN Daemon box and when i click save/apply settings, I get the applying settings loading box for a few seconds and when it reloads the ca.crt box is empty. I SSHed into the router and looked in the /tmp/openvpn folder and it returned: "cert.pem key.pem route-down.sh
dh.pem openvpn.conf route-up.sh". Any ideas? Should I just write the ca.crt file with a startup script or is there something I'm just missing?
mobilistix
DD-WRT Novice


Joined: 13 May 2009
Posts: 5

PostPosted: Thu Aug 19, 2010 19:27    Post subject: ca.crt not saving? Reply with quote
I have been running OpenVPN on DD-WRT v24-sp2 (05/08/09) mega - build 12058 for more than a year, and recently had this problem when making a config change on the DHCP server, a seemingly unrelated change that should not have effected the VPN.

What I had to do to restore the VPN configuration and get the ca.crt to save:
- cleared all the configuration settings at the GUI
- disabled the VPN at the GUI
- saved, applied, power-off reboot, reset
- enable the VPN server at the GUI
- re-apply all the configuration settings including ca.crt
keamas
DD-WRT Novice


Joined: 13 Jul 2007
Posts: 17

PostPosted: Wed Oct 27, 2010 9:48    Post subject: Reply with quote
Can anyone post how to route the whole traffic through the VPN tunnel with the Gateway scenario ?
McKayCR
DD-WRT Novice


Joined: 05 Sep 2009
Posts: 36
Location: Maryland

PostPosted: Thu Oct 28, 2010 22:08    Post subject: VPN still running great Reply with quote
So I have been running my VPN a year next month using both Ubuntu and windows. If anyone needs basic help setting it up PM me, I'm willing to jump on GTalk and help you through it.

The only concerns I have are these two errors. I searched google and I can't find what I'm looking for. Should I be concerned about these warnings? Can I make the go away?

W WARNING: file '/tmp/openvpn/key.pem' is group or others accessible
W WARNING: file '/tmp/openvpn/ta.key' is group or others accessible

And one last thing; My ca.crt in my router mysteriously disappeared again. I swear its cause I'm running out of memory. I tried putting the cert back but every time I saved the settings, the cert wouldn't stick. So I cleaned out old static IP address, cleaned up wireless MAC IP filters, removed old port forwarding rules, and the cert saved.

I'm still working on the VPN between two routers (but not very hard). I never have gotten it to stay up for more then 24 hours...

_________________
WRT54G v3
WRT300N v1
bl@d3runn3r
DD-WRT User


Joined: 10 Jan 2010
Posts: 210

PostPosted: Mon Nov 29, 2010 17:53    Post subject: Reply with quote
Running DD-WRT v24-sp2 (11/21/10) std - build 15778 myself on a Dlink DIR-825 and trying to get things working using the "new Style" option any guide for that, it seems everything fails.

I'm not familiar with OpenVPN on DD-WRT so any help would be appreciated.
star
DD-WRT Novice


Joined: 05 Mar 2007
Posts: 34

PostPosted: Tue Nov 30, 2010 1:34    Post subject: Re: VPN still running great Reply with quote
McKayCR wrote:
So I have been running my VPN a year next month using both Ubuntu and windows. If anyone needs basic help setting it up PM me, I'm willing to jump on GTalk and help you through it.

The only concerns I have are these two errors. I searched google and I can't find what I'm looking for. Should I be concerned about these warnings? Can I make the go away?

W WARNING: file '/tmp/openvpn/key.pem' is group or others accessible
W WARNING: file '/tmp/openvpn/ta.key' is group or others accessible

These warnings are due to permissions on the key.pem and ta.key files. For security reasons, you don't want anyone but the effective OpenVPN process' user account/group (root/root, or ones you create specifically for this purpose) to be able to access these. These can be safely ignored from a functionality perspective, but as a matter of good practice you should write a script that includes the following:

Code:
chmod 600 /tmp/openvpn/key.pem
chmod 600 /tmp/openvpn/ta.key


The above will set "read/write/no execute" access for the owner ("600"), and "no access whatsoever" for group members ("600") or anyone else ("600"). This will prevent additional warnings from hitting your logs.

I can't help with your other question because my OpenVPN config is done purely from the CLI, not the DD-WRT GUI.[/u]
Goto page Previous  1, 2, 3 ... 20, 21, 22, 23, 24  Next Display posts from previous:    Page 21 of 24
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum