S
S
Serega Kuzmin2015-04-27 21:47:38
openvpn
Serega Kuzmin, 2015-04-27 21:47:38

Mikrotik openVpn client routing setup?

Good day! Need advice on Mikrotik!? CentOS 6 server has an openVPN server on it and an internal subnet of 192.168.0.1 in the branch there is an openVPN client Mikrotik and there is a subnet of 192.168.1.0. 0.1 and vice versa NO. What is the problem I can throw off the server settings.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
lexalex, 2015-04-28
@KuzminSI

You need to turn off nat on Mikrotik by disabling the necessary rules in /ip firewall nat
On the server with CentOS, as gorczko said above, register the route something like this: route add 192.168.1.0/24 gw 192.168.1.50, where 192.168.1.50 is the ip address mikrotik in the network 192.168.1.0, it is also important to know what size is the /24 network?

G
gorczko, 2015-04-27
@gorczko

Correctly. Enabled NAT on Mikrotik. It is necessary to register routes from the network 192.168.0.1 to the network 192.168.1.0.
Network interface addresses must be assigned.

/ ip address 
add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 \
    interface=ether1 comment="local 0" disabled=no 
add address=182.168.1.1/24 network=192.168.1.0 broadcast=192.168.1.255 \
    interface=ether2 comment="local 1" disabled=no

The next step is to write the routes.
/ip route
add disabled=no distance=1 dst-address=192.168.0.0/24 gateway=192.168.0.1 \
routing-mark=lan1_rout scope=30 target-scope=10
add disabled=no distance=1 dst-address=192.168.1.0/24 gateway=192.168.1.1 \
routing-mark=lan2_rout scope=30 target-scope=10

For clients, you will need to specify default gateways, respectively, for their subnets.
Or, if you want to merge both networks at all, change the mask to /16.
It will be useful to read here and here to help .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question