Difference between revisions of "Mikrotik: OpenVPN - Server ke PC dari wiki mikrotik"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
Line 1: | Line 1: | ||
Sumber: https://wiki.mikrotik.com/wiki/Manual:Interface/OVPN | Sumber: https://wiki.mikrotik.com/wiki/Manual:Interface/OVPN | ||
+ | [[File:Ipsec-road-warrior (1).png]] | ||
− | |||
− | == | + | ==Server== |
− | / | + | /ip pool add name=ovpn-pool range=192.168.77.2-192.168.77.254 |
− | + | ||
− | + | /ppp profile add name=ovpn local-address=192.168.77.1 remote-address=ovpn-pool | |
− | + | /ppp secret | |
− | add name= | + | add name=client1 password=123 profile=ovpn |
− | + | add name=client2 password=234 profile=ovpn | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | / | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | == | + | /interface ovpn-server server set enabled=yes certificate=server |
− | |||
− | |||
− | |||
− | |||
− | + | ==Client== | |
− | + | /interface ovpn-client | |
− | + | add name=ovpn-client1 connect-to=2.2.2.2 user=client1 password=123 disabled=no | |
− | + | /ip route | |
− | + | add dst-address=10.5.8.20 gateway=ovpn-client1 | |
− | /interface ovpn- | + | add dst-address=192.168.55.0/24 gateway=ovpn-client1 |
− | + | /ip firewall nat add chain=srcnat action=masquerade out-interface=ovpn-client1 | |
− | |||
− | |||
− | |||
− | |||
− | / | ||
− | |||
− | |||
− | add | ||
− | |||
Revision as of 12:20, 29 December 2022
Sumber: https://wiki.mikrotik.com/wiki/Manual:Interface/OVPN
Server
/ip pool add name=ovpn-pool range=192.168.77.2-192.168.77.254 /ppp profile add name=ovpn local-address=192.168.77.1 remote-address=ovpn-pool /ppp secret add name=client1 password=123 profile=ovpn add name=client2 password=234 profile=ovpn
/interface ovpn-server server set enabled=yes certificate=server
Client
/interface ovpn-client add name=ovpn-client1 connect-to=2.2.2.2 user=client1 password=123 disabled=no /ip route add dst-address=10.5.8.20 gateway=ovpn-client1 add dst-address=192.168.55.0/24 gateway=ovpn-client1 /ip firewall nat add chain=srcnat action=masquerade out-interface=ovpn-client1