LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-19-2017, 04:22 PM   #1
snovosel112811
LQ Newbie
 
Registered: Jan 2017
Posts: 9

Rep: Reputation: Disabled
Should tun0 ip address match on both client and server (openvpn)


Hello everyone, simple question here:

When I run ifconfig on my client I receive the following (when connected to the VPN)


Code:
[ tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:10.8.0.6  P-t-P:10.8.0.5  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:108 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:0 (0.0 B)  TX bytes:7540 (7.5 KB) ]
When I run the same command on my server:

Code:
[ tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:10.8.0.1  P-t-P:10.8.0.2  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:172 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:10560 (10.5 KB)  TX bytes:264 (264.0 B) ]
Should the inet addr match for both server and client? When I connect to my VPN server, I can connect but can't connect to the internet. I also can't ping anything.

Last edited by snovosel112811; 01-19-2017 at 04:24 PM.
 
Old 01-19-2017, 08:10 PM   #2
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,649
Blog Entries: 4

Rep: Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934
Actually . . . "No! ... Absolutely not!"

"The various participants in your OpenVPN network," including both the servers and any-and-all clients who are connected directly to them, necessarily must have a private-to-them range of IP-addresses through which they can communicate among themselves, without any conflict against any (client ...) address-range whose communications they might be passing from here to there.

Typically, this agreed-upon address range is (say ...) 10.8.0.x.

The OpenVPN server carves-out a couple of these addresses for itself, then doles-out other ones both for "other servers" and for directly-connected machines who are running OpenVPN-client software directly.

"The 10.8.0.x subnet," therefore, is "a subnet that OpenVPN reserves unto itself," trusting that no other 'private subnet' anywhere on Planet Earth would dare(!) to conflict with its sovereign addresses. OpenVPN expects to be able to use these addresses to communicate directly among the various other OpenVPN clients/servers in its present network, as well as the various clients who are directly connected to any of them.

(If your machine happens to host more-than-one OpenVPN process, then ".8" might turn out to be a sequentially-larger number ... but, I digress.™)

- - -
"And of course, this is merely the usual TCP/IP Routing™ use-case . . ."

Last edited by sundialsvcs; 01-19-2017 at 10:07 PM.
 
  


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
Directing OpenVPN client's traffic through the OpenVPN server mohtasham1983 Linux - Networking 1 01-17-2012 06:44 PM
How to set a route for Eth1 (DHCP clients) to reach Tun0 (openvpn server)? CentOS torontob Linux - Networking 2 09-22-2010 12:14 AM
OpenVPN client has not default gateway when connect to OpenVPN server sailershen Linux - Security 3 03-04-2010 02:20 AM
iptables question with OpenVPN (tun0 to tun0 filtering) fang0654 Linux - Server 3 09-30-2009 02:17 AM
OpenVPN : need help with understanding tun0 and P-t-P jonaskellens Linux - Networking 3 08-24-2009 01:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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