LinuxQuestions.org
Help answer threads with 0 replies.
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 09-25-2011, 07:56 AM   #1
zealer
LQ Newbie
 
Registered: Apr 2010
Distribution: Fedora
Posts: 10

Rep: Reputation: 0
Unhappy OpenVPN tunnel problem on BSD 4.9


Hello dear experts,

I have OpenVPN-2.2.1 configured on two OpenBSD 4.9
I am able to ping: client -> server and all networks behind
I am not able to ping: server -> client at all

I already checked my FW, you can see the configuration below.
Ping works with pf and OpenVPN stopped. (OK)
Ping does not work with pf enabled and openVPN stopped. (OK)
Ping works in only one direction with pf and OpenVPN enabled (NOT OK)

And a small question: why is there one tunnel from the client's point of view (10.0.1.6 -> 10.0.1.5), but from the server's point of view - there is a different tunnel (10.0.1.1 -> 10.0.1.2)? What am I missing here? In my understanding, there should be only one tunnel (for example 10.0.1.0/30, with .0 being the net, .1 server, .2 the client and .3 the broadcast).


Please help me figure that out... i have a feeling it is something really simple, but I dont know where to go from here...
Uploaded are screenshots with my setup:

The Topology

Firewall setup
OpenVPN configurations
Interface IPs + routing tables

Ping from client to server succeeds
Ping from server to client fails


Thank you VERY much in advance for your help, it is greatly appreciated!
Kind regards,
Simeon
 
Old 09-26-2011, 04:14 AM   #2
Lexus45
Member
 
Registered: Jan 2010
Distribution: Debian, Centos, Ubuntu, Slackware
Posts: 361
Blog Entries: 3

Rep: Reputation: 48
If you have to connect only 2 computers, try to use this simple "quick'n dirty" HOWTO. I think it's very good for point-to-point connection and will serve well in most cases.
It's designed to 2 computers only. Maybe this can be a good start point for solving your problem?

You've already mentioned that:
Quote:
Ping works with pf and OpenVPN stopped. (OK)
Ping does not work with pf enabled and openVPN stopped. (OK)
Ping works in only one direction with pf and OpenVPN enabled (NOT OK)
What about the 4th situation: pf is disabled (or it passes from any to any , on any interface) and the tunnel is activated? At this step you will see if the problem is in OpenVPN configuration or not.

As I see, you use NAT in your PF config files. So, after disabling PF (in fact, removing all rules from the memory) it's obvious that NAT will not work. So, try to ping between the server and the client only, not the subnet behind. Or add extra routes, to use routing instead of NAT. But I hope you know all this without my advice. :-)

Last edited by Lexus45; 09-26-2011 at 04:33 AM.
 
Old 09-26-2011, 02:28 PM   #3
zealer
LQ Newbie
 
Registered: Apr 2010
Distribution: Fedora
Posts: 10

Original Poster
Rep: Reputation: 0
Hi, thanks for your reply.

Already tried it:
pf disabled/enabled: a ping sweep (10.0.1.1 to 10.0.1.10) from the client succeeds only on 10.0.1.1, and from the server - only on 10.0.1.6
Strange
 
Old 09-27-2011, 04:23 PM   #4
zealer
LQ Newbie
 
Registered: Apr 2010
Distribution: Fedora
Posts: 10

Original Poster
Rep: Reputation: 0
Okay, I resolved my problem, here is what it:

On the VPN server, there should be a file "[ccd directory]/[client_OU]". Both are specified in the "vars" file. In my case i had to create a file "/etc/openvpn/ccd/192.168.2.200". This file should contain the "iroute" command to the remote network. In my case it was "iroute 192.168.0.0 255.255.255.0"
 
  


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 and ipV6 tunnel? gnirtS Debian 1 02-21-2011 11:16 AM
Setup VPN tunnel with OpenVPN hasanrana Linux - Newbie 1 01-31-2010 10:37 AM
Server with two IP addresses, how do I use the 2nd one for an openvpn tunnel? remote42 Linux - Networking 0 06-21-2009 02:15 PM
What is different between ip tunnel vpn and openvpn ? sgm277 Linux - Server 2 12-24-2008 10:58 PM
OpenVPN tunnel problem skyfly Linux - Networking 1 04-11-2006 11:56 PM

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

All times are GMT -5. The time now is 01:37 PM.

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