OpenVPN concept problem

I need some help in some concepts about VPN:

I have two LAN in different cities and i need one computer to access the other one's services (an accounting software in this case). I'll call them LANHOME (the "server" LAN) and LAN-REMOTE (the "client" LAN).

Inside "LAN-HOME" there's a computer named GATEWAY which is a Linux machine providing proxy, email, firewall, etc. There's also a machine called TARGET which has the accounting software we need to allow other users to use.

Inside "LAN-REMOTE" there's also a computer named GATEWAY, also a linux machine providing proxy, firewall, etc. And there's a PC called GUEST which need to access a shared folder in TARGET in "LAN-HOME".

We installed openVPN (2.0.7, the last one i think) in GATEWAY in LAN-HOME.  We designated it as a server and started the service after creating two users according to the manual in  We copied the ca.crt, client1.crt, client1.csr and client1.key files into GUEST and also installed the openVPN (for windows as GUEST is XPSP2).

We used TUN (modprobe tun) in GATEWAY in LAN-HOME. This is a mandrake 9.1 machine with firewall disabled (just for testing). Actually it shows a lot of stuff and it seesm to connect (at least both client and server show a lot of stuff and finally says: Initialization Sequence Completed. We use network in LAN-HOME and in LAN-REMOTE.  We used for the tunnel (as it said in the manual in We can ping the tunnel other side (

My funny question is: Now what ? afaik, now we have a tunnel from GUEST to GATEWAY in LAN-HOME. Now, how do we "enable" GUEST to access the internal network in LAN-HOME in order to reach TARGET? i read later that this is achieved through bridging. is this true ? if so, then what for is tunneling ? as i remember, bridging requires a big bandwitdh because it sends all trafic from each side to the other one and although seems a good choice, i've read that it requires kernel complie, and lot's of things i don't handle very well (some bridge-utils thing, etc). And again, what for can i use the tunnel i have now ?

Or, the VPN server should be in TARGET and i should forward traffic from port 1197 in GATEWAY in LAN-HOME to TARGET ? wouldn't  this be a problem after the firewall rewrites packets ?

I read also that a TUN adapter is for tunneling (routing) and TAP for bridging. is this true ?

Thanks a lot. As you can see it's more of a concept problem.

Who is Participating?

It is hard to trouble shoot VPN problem over EE like this but since it is more of a concept problem, I believe by explaining a bit more in details you should be able to get it right.

> Now, how do we "enable" GUEST to access the internal network in LAN-HOME in order to reach TARGET?
You can do it two ways, bridging or routing.  Now youare GATEWAY is like a router (but secured with VPN).  In order for GUEST to read your TARGET, GATEWAY has to do one of the two thing, route the traffic from GUEST's subnet (now to TARGET's subnet (  Routing is lighter on the bandwidth but you cannot use things like Windows machine name (not without WINS).  Another way is that you do bridging, that join the two subnet ( and together.

> I read also that a TUN adapter is for tunneling (routing) and TAP for bridging. is this true ?
TUN and TAP are similar, just that TUN works like Point-to-point interface (like a modem line) and TAP works like an Ethernet interface (ref:  The statement you made is not really correct, if you think about it, you can use Ethernet for routing too.

mrxcolAuthor Commented:
I think i got the concept. But one question comes to my mind:

When we make a VNC connection (like realVNC) what is created ? something like a tunnel ? As i read, a tunnel is like creating a /dev/longcable to /dev/longcable in the other machine and route traffic through it so any specially designed application can utilize this tunnel. If i'm not wrong, this is what VNC does.

But i wonder, isn't this the same as starting a service in target computer (listening on port xxx) and have the other computer connect to it ?

In other words:

- Having a computer connect to other one directly (TCP or UDP) connection.
- Creating a VNC from one computher to other
- creating a VPN (tunnel mode) from one computer to other

is the same thing ? (just that VPN may compress and cypher the data)

Thanks for your help.
Hi mrxcol,

Hmm.. you concept is right in a way.  Having computers connecting to one another over the internet is all the same.  However VPN has encryption which ensure that the data transmitted in between is safe.  

VNC is a bit different to VPN because VNC is an application to remotely display and transmit the mouse, keyboard information to the remote machine to control it.  I am sure you already know the different, but just make VNC as an example.

Another thing is that if you are on bridging in VPN, you actually appears as you are on the local network.  There is no routing, so you can connect to any computer on LAN-HOME like what you do with the computer on the local network.  (like browse for machines, mount drive on XP, etc).
mrxcolAuthor Commented:
Thanks a lot. Now i'll try to find a way to have this vpw to bridge.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.