Need to use VPN tunnel for class C network using class A tunnel

1.1k views Asked by At

Here is the scenery. I have several buildings with same subnet IP addresses (192.168.0.0/24). I need to secure that connection with OpenVPN.

Please assist me how can I organize VPN connection with IP network 10.10.10.0/24

example

HQ (192.168.0.0/24) - VPN 1 (10.10.10.50) --- VPN 2 (10.10.10.51) - Branch (192.168.0.0/24)

I meas assist with NAT if it will be needed or if I just connect , the C class traffic will just be passed through.

Thank you

2

There are 2 answers

0
CijcoSistems On BEST ANSWER

Since you are merging two nets, you should use TAP interfaces.

TAP (as in network tap) simulates a link layer device and it operates with layer 2 packets such as Ethernet frames. TUN (as in network TUNnel) simulates a network layer device and it operates with layer 3 packets such as IP packets. TAP is used to create a network bridge, while TUN is used with routing.

This way, you will be joining the HQ network with the branch network like if you plug a (secure, pre-shared key may be ok) ethernet cable between them.

But this will likely crash both environments if they are operating now without knowing one about each other. Maybe the HQ router has the same IP as the branch one, or maybe not, but they are both acting as DHCP servers and now they will be on the same network.

Do you really need to merge both nets? I think you should consider to do some network design and let the HQ on the 192.168.0.0/24 but change the n-th branch to 192.168.n.0/24. Then you can do a TUN OpenVPN setup and route between branches and HQ in a hierachical way. It will save you some bandwith too by not spreading irrelevant broadcast traffic over the tunnel.

0
Narius On

Thank you

Well you know, I do not have any router installed in HQ side or anywhere in network and maybe that is a big minus (and I will fix that in a time). Now I just need to secure the links between HQ and branches so the optical network provider (that provides links) could not access out data. If you have any good solution please write.

Thank you