LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-12-2010, 08:37 AM   #1
riganta
Member
 
Registered: May 2007
Location: Cork (Ireland)
Distribution: Arch Xfce
Posts: 177

Rep: Reputation: 25
OpenVPN Server and Masquerading


Hi Guys,

I have set up OpenVPN Server on a VM (Ubuntu 1010) running virtualbox bridged to the host. Evertyhing is working fine excepts the fact that I cant seem to be able to assign internal IP (VPN Server) to client connectting. Let me explain: All my clients are connecting and accessing the internet without any issue. Where I have an issue is that all my clients come out the other way on the internet with my server ip address which kind of defeat the purpose. Is there a way (keeping in mind that I am running the server in a VM) to have all my clients accessing the internet with an IP provided by the VPN Seever ?

Thank you for your help
 
Old 12-12-2010, 01:29 PM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
I'm not sure that I understand exactly what you are saying. However that isn't going to stop me.

I believe that you are saying that clients on the Internet coming into your LAN can see the gateway address of your LAN and you want to stop that.

If that is the case then no you cannot stop that. Clients on the Internet need the publicly visible IP address of your gateway to get to your LAN.

Is that what you meant?
 
Old 12-12-2010, 01:56 PM   #3
riganta
Member
 
Registered: May 2007
Location: Cork (Ireland)
Distribution: Arch Xfce
Posts: 177

Original Poster
Rep: Reputation: 25
stress_junkie, thank you so much for your reply.
Almost but not quit. Sorry I have a very bad habit of not expressing myself very clearly...Will do my best
My clients connect to my server. I am using NAT in the VPN Subnet IP Pool. All is well as they connect to the internet through the VPN and they have access to the private subnets. All internet traffic is going through the server. What I dont understand is that they come out on the net with the VPN's server IP address. I had this crazy idea that the tcp header of the internal vpn addressing would be used internally and externally.
As per OpenVPN DOC, if you use NAT, each VPN client's virtual address is transformed via NAT so that the Access Server host's IP address is used as the source address on client packets destined for private subnets. Routing is so much more complicated but would use the virtual address of each VPN clients as the source address destined for private subnets. Using the later, routing of private subnets would need to be configured on the host so the response packets can be routed back to the VPN client via the access server host's IP address on the private subnet. Add this to the fact that I am using a virtual machine bridged to the host make my brain boils up when I tried to figure out routing. Some of us are blessed with inteligence and for the rest like me we need hard work Finally, when the internet traffic if going through the VPN access server, the default route on a client seems to be pointing to the VPN gateway's virtual IP address.

Now, it does make more sense that the internet traffic from clients being filtered through the server, all the clients end up with the same IP which is the one from the Access Server.
Question: Is there a way I could manage each client to not have the Access Server Public IP address ?


Hope that clarifies a bit more..

Thanks
 
Old 12-12-2010, 02:06 PM   #4
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
It sounds like you cut and pasted from a textbook. Can't you simplify your question? I'm getting a headache trying to understand your post.
 
Old 12-12-2010, 02:30 PM   #5
riganta
Member
 
Registered: May 2007
Location: Cork (Ireland)
Distribution: Arch Xfce
Posts: 177

Original Poster
Rep: Reputation: 25
wont do any better than this, sorry..
Thanks for your help anyways
I have a working vpn server which will do for the moment..
 
  


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
Enabling full routing site to site with openvpn, not using masquerading. Tried quagga pwn Linux - Networking 3 07-30-2010 06:31 AM
OpenVPN client has not default gateway when connect to OpenVPN server sailershen Linux - Security 3 03-04-2010 02:20 AM
How does OpenVPN Linux server issues IP and netmask to OpenVPN clients on Windows XP pssompura Linux - Networking 0 12-24-2009 02:42 AM
IP Masquerading or Proxy server cutegul985 Linux - Networking 4 10-19-2004 01:33 PM
IP Masquerading or Proxy server cutegul985 Linux - Software 0 10-17-2004 01:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:07 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