Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 06-05-2008, 10:54 AM   #1
LQ Newbie
Registered: Jun 2008
Posts: 3

Rep: Reputation: 0
Linux routing with openvpn

I am having troubles getting data to route to a second interface on a Debian Linux (Etch) box and I am really sure it is something simple but I can't find a straight answer anywhere on the net.

I have a Linux box and a Win2K3 box linked with OpenVPN. The link is established and they ping each other and it is fast. However the problems is that I can't seem to get information from the tun0 adapter to the eth0 adapter to be forwarded to the LAN.

My net looks like

Lan( <-> openvpn( <-> router <-> Internet <-> router <-> openvpn( <-> Lan(

What I find is very strange is that if I do a ping -I tun0
I get the following information:

PING ( from tun0: 56(84) bytes of data.

--- ping statistics ---
6 packets transmitted, 0 received, 100% packet loss, time 5008ms

I am guessing that linux is not forwarding between interfaces. I removed Iptables because I don't care about firewalling at this point. Do I need to do forwarding or routing and if so what would the command syntax look like.

Any help would be appreciated.
Old 06-06-2008, 06:07 AM   #2
Registered: Jun 2006
Location: Johannesburg, South Africa
Distribution: Ubuntu, CentOS, Debian
Posts: 47

Rep: Reputation: 15
Have you set-up pushing of the routes to the client side in the openvpn.conf (server side) ?

# Push routes to the client to allow it
# to reach other private subnets behind
# the server.  Remember that these
# private subnets will also need
# to know to route the OpenVPN client
# address pool (
# back to the OpenVPN server.
push "route"
If yes, then are the routes setup?
Old 06-08-2008, 02:48 PM   #3
LQ Newbie
Registered: Jun 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Yes it is there.

The issue I am working on now is regardless of OpenVPN at this point, the routes on the interfaces don't work. Or am I to believe that the generic route commands don't work on the vitural Openvpn TUN adapters?

For instance lets say that I have 2 ethernet NICS in this server. Why can't I route between them?

I have IP_FORWARD set to "1"
I have removed IPTABLES so that isn't the issue.
I have created routes using the route add commands:

route add -net gw dev tun0 (SiteA)
route add -net gw dev tun0 (SiteB)
Old 06-08-2008, 02:50 PM   #4
LQ Newbie
Registered: Jun 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Sorry the gateways I am using are and respectively.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Complex OpenVPN setup and routing joadoor Linux - Networking 2 08-05-2008 08:28 PM
Routing from OpenVPN server jjge Linux - Networking 1 08-29-2006 09:34 AM
[openvpn] routing at server side Zym0tiC Linux - Networking 2 10-06-2005 03:40 PM
openVPN and routing issues mdkelly069 Linux - Networking 0 07-12-2004 12:19 PM
OpenVPN Routing problem groetschel Linux - Networking 4 04-28-2004 04:07 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:19 PM.

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