LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-22-2009, 06:03 AM   #1
jonnytabpni
Member
 
Registered: Sep 2008
Posts: 68

Rep: Reputation: 16
normal default gateway reapperas with openvpn redirect-gateway


Hi folks,

I'm using OpenWRT on a WRT54GS.

I'm using wifidog in combination with openvpn. For those of you familiar with wifidog, my auth server is located at the other end of an openvpn tunnel and the "wifi dog gateway" is running on the WRT itself.

I'm don't really think that wifi dog is the issue. Basically, I'm using openvpn with the "redirect-gateway" option which works well. In this mode, openvpn removes my current default gateway setting and adds the remote openvpn server as the default gateway (as it should). However, overnight, my default gateway on the local network keeps reapperaing (along with the openvpn one as well). This causes confusion and i don't want any packets (But ovbiously the connection to the actual openvpn server) to go down this local gateway.

Why do you think it reappears? Do you reckon openvpn is dropping connection and somehow the normal gateway is being added back?
I *could* run a cron script which runs every minute or so with something like "route del default gw xx.xx.xx.xx" (where xx.xx.xx.xx is the default gateway which I don't want to be there) but that is quite messy and means that if I were to ever move the router I would need to reconfigure this and considering that I would like in the future to have many of these wifi dog gateways, this really isn't an ideal option (as every network will have a different default gateway).

Thanks for the help

Cheers
 
Old 04-22-2009, 11:43 PM   #2
grepmasterd
Member
 
Registered: Aug 2003
Location: Seattle
Distribution: ubuntu, lately
Posts: 182
Blog Entries: 1

Rep: Reputation: 35
can't say without more knowledge of your configuration, but I'll take a guess that your LAN interface is using DHCP, and after several hours the local default gw is reassigned via DHCP refresh. to test it, change your server's DHCP lease time to something short and see if you can watch it happen.
 
Old 04-23-2009, 02:11 PM   #3
jonnytabpni
Member
 
Registered: Sep 2008
Posts: 68

Original Poster
Rep: Reputation: 16
Hi grepmasterd,

Fantastic suggestion! I'll change from DHCP to static and give that I try.

I feel so stupid for not thinking of that!

I'll let you know tomorrow how this plays out

Cheers
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenVPN client has not default gateway when connect to OpenVPN server sailershen Linux - Security 3 03-04-2010 02:20 AM
OpenVPN in VirtualPC, no default gateway Byron31 Linux - Networking 1 02-10-2008 09:44 AM
LXer: Lintrack As A LAN Gateway And An OpenVPN Bridge LXer Syndicated Linux News 0 05-11-2007 02:01 PM
OpenVPN on IPCop gateway settings rebirth Linux - Software 3 09-06-2006 12:02 AM
How do I get iptables to redirect my default gateway address? Paul Woodhouse Linux - Networking 3 11-11-2003 08:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration