# vpn tunnel and the same network



## Amarantus (Apr 3, 2014)

Hi,

Is it possible to connect VPN tunnel via Internet (two FreeBSD 10 and PF machines) in that way that in one side I have network 192.168.0.0/24 and on the other side I have the same network 192.168.0.0/24?

Best regards
Michal


----------



## SirDice (Apr 3, 2014)

Amarantus said:
			
		

> Is it possible to connect VPN tunnel via Internet (two FreeBSD 10 and PF machines) in that way that in one side I have network 192.168.0.0/24 and on the other side I have the same network 192.168.0.0/24?


That should be possible but it's going to make it quite complex to get working. It'll be easier if both sides use different subnets. Less error prone, easier to maintain etc.


----------



## Amarantus (Apr 3, 2014)

Thanks for the answer. I think of two different networks.


----------



## SirDice (Apr 3, 2014)

If you're building a new network it'll be a lot easier if you have different subnets from the start. In some cases that's not possible, I've worked at companies that merged with other companies and the problems begin when you have to connect both networks and they both use the same IP addresses. Obviously upper management wanted to exchange data even before the merger was finalized. I think we solved it back then using a lot of double NAT trickery. It worked but it was an administrative nightmare. Soon after the merger was completed we started an IP renumber project to re-assign new IP addresses to everything. Splitting everything up into different network segments while allowing for future expansion. The next merger went a lot smoother after that


----------

