LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 06-05-2008, 10:54 AM   #1
cn.n
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(172.0.0.0/16) <-> openvpn(172.0.0.5)(10.3.0.1) <-> router <-> Internet <-> router <-> openvpn(10.3.0.2)(192.168.0.4) <-> Lan(192.168.0.0/24)


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

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

--- 192.168.0.4 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
garyalex
Member
 
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) ?

Code:
# 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 (10.8.0.0/255.255.255.0)
# back to the OpenVPN server.
push "route 192.168.0.0 255.255.255.0"
If yes, then are the routes setup?
 
Old 06-08-2008, 02:48 PM   #3
cn.n
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 192.168.0.0/24 gw 10.3.0.2 dev tun0 (SiteA)
route add -net 172.0.0.0/16 gw 10.3.0.1 dev tun0 (SiteB)
 
Old 06-08-2008, 02:50 PM   #4
cn.n
LQ Newbie
 
Registered: Jun 2008
Posts: 3

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


Reply


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


All times are GMT -5. The time now is 02:12 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration