K
K
Klajnor2012-04-10 16:50:06
Computer networks
Klajnor, 2012-04-10 16:50:06

MicroTik. Home network 192.168.1.0/24 and work network 192.168.1.0/24 via VPN

At work there is a fryakha on which the pptp server is configured. There was an idea to implement a permanent connection to the working network on Mikrotik, but there is a problem.
Both home and work networks have addresses 192.168.1.0/24. I don't want to change my home network range. Used to. Operating network range is not possible. When connected to a VPN, Mikrotik receives an IP from the range 192.168.111.201-192.168.111.210.
I think we need to add a rule like:
/ip firewall nat add chain=srcnat src-address=2.2.2.1-2.2.2.254 \
action=netmap to-addresses=11.11.11.1-11.11.11.254
Taken from Mikrotik's wiki, did not change addresses . And specify the pptp interface. Will such a rule translate addresses from the working network to addresses like 192.168.2.0/24? Or how to connect correctly?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Andrey Burov, 2012-04-10
@BuriK666

You will have to change the network addressing somewhere, because. there cannot be two different networks directly connected to each other and having the same address space.

D
DmZ, 2012-04-10
@DmZ

You correctly subtracted from the wiki, only you need not srcnat, but dstnat.
Those. you can try to connect to office and map its range 192.168.1.0/24 to virtual 1.1.1.0/24. And accordingly from the house to go to addresses of the form 1.1.1.10 which will be deployed to the office 192.168.1.10.
in this case, dst-address=1.1.1.0/24 and to-addresses=192.168.1.0/24
will still need masquerading on the vpn interface so that the office can route the answers normally and route the network 1.1.1.0/24 through vpn.

R
rPman, 2012-04-11
@rPman

For a very long time, from the very beginning of using a personal local network, I have been using addresses like 192.168. 234.x /24. Haven't crossed anything yet.

U
ur3ckr, 2012-04-11
@ur3ckr

I had an almost similar task. Freebsd at work, network 192.168.2.0/24, Mikrotik at home, network 192.168.0.0/24 I had to go to work from home. I did this: I set up a pptp server on Mikrotik, set up a username and password. At work, I installed the mpd5-client on fribsd, registered a login and a pass. I added it to the cron and registered route add From work, I only ping miktorik, which was what was needed. From home I can easily connect to any work computer.

T
tassadar_ha, 2012-04-10
@tassadar_ha

From the point of view of network engineering, a VPN based on the L2 protocol will help you. For example, L2TP. I don't know how to specifically set it up in FreeBSD, try googling it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question