OpenVPN on Mikrotik
GLC Networks
SUPONO
Mikrotik enthusiast
Contact:
supono@gmail.com
Contents:
● Intro to VPN
● Encryption
● OpenVPN
● OpenVPN on Mikrotik
● Demo
Intro into
VPN
What is VPN
Why Should I Use a VPN?
How Does a VPN Work?
Type of Implementation
What is VPN ?
VPNs are private
networks over
public network
Why Should I Use a VPN?
● VPNs use advanced encryption and ‘tunneling’ technology to
establish secure connection
● Employees can access the network (Intranet) from remote locations.
● The Internet is used as the backbone for VPNs
● Saves cost tremendously from reduction of equipment and
maintenance costs.
● Scalability
How Does a VPN Work?
https://www.reddit.com/r/memes/comments/9vcpac/how_a_vpn_works/
How Does a VPN Work?
192.168.1.2/24
192.168.2.2/24
Types of Implementations
● Remote Access – Employee to Business
● Intranet – Within an organization
● Extranet – Outside an organization
Encryption
What is Encryption
Symetric Encryption
Asymetric Encryption
What is Encryption ?
Encryption is the method by which information
is covered into secret code that hides the
information’s true meaning
The science of encrypting and decrypting
information is called Cryptography.
Cryptology
Cryptanalysis Cryptography
Encryption
Digital Signatures
Message
Authentication Codes
(MAC) Hash Functions
Encryption Schemes
Symmetric encryption
Uses a single key that needs to be shared among the people who need to
receive the message.
Asymmetric encryption
Uses a pair of public key and private key to encrypt and decrypt messages
when comunicating.
Symmetric encryption
A single key to encrypt and decrypt (same key)
Doesn’t scale very well
If it gets out, you will need another key for all
Asymmetric Encryption
Public Key Cryptography
a process that uses a pair of related keys
● Private key
○ Keep it private
○ Key that can decrypt data encrypted with the public key
● Public Key
○ Anyone can see the key
○ Key to encrypt data
OpenVPN
What is OpenVPN ?
Why use OpenVPN ?
What is OpenVPN ?
With OpenVPN, you can:
● Tunnel any IP subnetwork or virtual ethernet adapter
● Configure a scalable, load-balanced VPN server farm
● use all of the encryption, authentication, and certification features
of the OpenSSL library to protect your private network traffic
● Create secure ethernet bridges using virtual tap devices
source : https://openvpn.net
Why use OpenVPN ?
● OpenVPN has been ported to various platforms (Linux, Windows,
Mac, Mobile phone) and it's configuration is throughout likewise on
each of these systems
● Easier to support and maintain.
● OpenVPN is one of the few VPN protocols that can make use of a
proxy, which might be handy sometimes.
OpenVPN
on
Mikrotik
OpenVPN Feature on
Mikrotik
OpenVPN on Mikrotik
requires v3.x
install and enable the ppp package
only tcp is supported. udp will not work.
OpenVPN Features on Mikrotik
Supported
● TCP
● Bridging (tap device) (ethernet in Mikrotik)
● Routing (tun device) (ip in Mikrotik)
● Certificates
● p2p mode (refer to OpenVPN V2.1 manual page)
Unsupported
● UDP
● LZO compression
DEMO
Step
Step 1
Create self sign
certificate
Step 2
Configure Server
Step 3
Configure Client
Create
self sign
Certificate
https://github.com/supon0/MikrotikCertificate.git
/certificate
add name=rootCA common-name=supono.com
sign rootCA ca-crl-host=10.0.0.1
export-certificate rootCA export-passphrase=12345678
filename=rootCA
Configure
Server
https://github.com/supon0/MikrotikOVPN/blob/main/
server.rsc
#Setting nama Device
/system identity set name=R1
#Setting IP Address
/ip address
add address=10.0.0.1/24 interface=ether1
add address=192.168.1.1/24 interface=ether2
Configure
Server
#Setting OVPN
/interface ovpn-server server set enabled=yes certificate=rootCA
#Menambah User OVPN
/ppp secret add name=R2 password=123 local-address=12.0.0.1
remote-address=12.0.0.2
#Menambah routing lewat OVPN
/ip route add dst-address=192.168.2.0/24 gateway=12.0.0.2
#Verifikasi
/interface ovpn-server server print
#Monitoring OVPN
/interface ovpn-server monitor 0
Configure
Client
https://github.com/supon0/MikrotikOVPN/blob/
main/client.rsc
#Setting nama Device
/system identity set name=R2
#Setting IP Address
/ip address
add address=10.0.0.2/24 interface=ether1
add address=192.168.2.1/24 interface=ether2
#Verifikasi IP Address
/ping 10.0.0.1
/ping 192.168.2.2
Configure
Client
#Copy Certificate
/tool fetch mode=ftp user=admin password=""
address=10.0.0.1 src-path=rootCA.key
/tool fetch mode=ftp user=admin password=""
address=10.0.0.1 src-path=rootCA.crt
#Tambah Routing lewat OVPN
/ip route
add dst-address=192.168.1.0/24
gateway=12.0.0.1
Configure
Client
#Import Certificate
/certificate
import name=rootCA file-name=rootCA.crt
passphrase=12345678
import name=rootCA file-name=rootCA.key
passphrase=12345678
#Buat OVPN Client
/interface ovpn-client add name=OVPN-to-R1
user=R2 password=123 connect-to=10.0.0.1
certificate=rootCA
Thank you

More Related Content

PDF
Mikrotik Load Balancing with PCC
PDF
Using Mikrotik Switch Features to Improve Your Network
PDF
IPv6 with Mikrotik
PDF
Connection load balancing with mikrotik [workshop]
PDF
Network LACP/Bonding/Teaming with Mikrotik
PDF
OSPF On Router OS7
PDF
IPsec on Mikrotik
PDF
Network Monitoring with The Dude and Whatsapp
Mikrotik Load Balancing with PCC
Using Mikrotik Switch Features to Improve Your Network
IPv6 with Mikrotik
Connection load balancing with mikrotik [workshop]
Network LACP/Bonding/Teaming with Mikrotik
OSPF On Router OS7
IPsec on Mikrotik
Network Monitoring with The Dude and Whatsapp

What's hot (20)

PDF
VLAN on mikrotik
PDF
Zabbix for Monitoring
PDF
Layer 7 Firewall on Mikrotik
PPTX
Fools your enemy with MikroTik
PDF
MPLS on Router OS V7 - Part 2
PDF
Mikrotik Fastpath vs Fasttrack
PDF
Mikrotik fastpath
PDF
Routing fundamentals with mikrotik
PDF
Mikrotik Hotspot
PDF
Mikrotik IP Settings For Performance and Security
PDF
Mikrotik firewall raw table
PDF
GLC webinar: limiting bandwidth using mikrotik
PPTX
VPN on Mikrotik
PDF
Socket Programming with Python
PDF
Mikrotik firewall filter
PDF
VLAN vs VXLAN
PDF
Policy Based Routing (PBR) on Mikrotik
PDF
MPLS on Router OS V7 - Part 1
PDF
Best Current Practice (BCP) 38 Ingress Filtering for Security
PDF
ISP load balancing with mikrotik nth
VLAN on mikrotik
Zabbix for Monitoring
Layer 7 Firewall on Mikrotik
Fools your enemy with MikroTik
MPLS on Router OS V7 - Part 2
Mikrotik Fastpath vs Fasttrack
Mikrotik fastpath
Routing fundamentals with mikrotik
Mikrotik Hotspot
Mikrotik IP Settings For Performance and Security
Mikrotik firewall raw table
GLC webinar: limiting bandwidth using mikrotik
VPN on Mikrotik
Socket Programming with Python
Mikrotik firewall filter
VLAN vs VXLAN
Policy Based Routing (PBR) on Mikrotik
MPLS on Router OS V7 - Part 1
Best Current Practice (BCP) 38 Ingress Filtering for Security
ISP load balancing with mikrotik nth
Ad

Similar to OpeVPN on Mikrotik (20)

PPTX
Virtual Private Network
DOCX
Site to-multi site open vpn solution-latest
PDF
10 Protocols of VPN IPSec, PPTP, L2TP, MPLS etc. ⋆ IPCisco.pdf
PPTX
Aryan_VPN_PPT.pptx
PDF
Shape your remote connection to your GCE instance
PPTX
VPN & FIREWALL
PPT
V P N
PPTX
Edge Computing: A Unified Infrastructure for all the Different Pieces
PPTX
Virtual Private Network
ODP
CurveZMQ, ZMTP and other Dubious Characters
PDF
SDN & NFV Introduction - Open Source Data Center Networking
PDF
Network Virtualization & Software-defined Networking
PPTX
6-virtualprivatenetworkvpndsfsdfsdf-111113032322-phpapp01.pptx
PDF
IP security and VPN presentation
ODP
Wireless security beyond password cracking by Mohit Ranjan
PDF
VPN (virtual private network)
PPTX
Zetta: An API First Platform
PDF
Kafka on Kubernetes—From Evaluation to Production at Intuit
PDF
Site to-multi site open vpn solution. with active directory auth
Virtual Private Network
Site to-multi site open vpn solution-latest
10 Protocols of VPN IPSec, PPTP, L2TP, MPLS etc. ⋆ IPCisco.pdf
Aryan_VPN_PPT.pptx
Shape your remote connection to your GCE instance
VPN & FIREWALL
V P N
Edge Computing: A Unified Infrastructure for all the Different Pieces
Virtual Private Network
CurveZMQ, ZMTP and other Dubious Characters
SDN & NFV Introduction - Open Source Data Center Networking
Network Virtualization & Software-defined Networking
6-virtualprivatenetworkvpndsfsdfsdf-111113032322-phpapp01.pptx
IP security and VPN presentation
Wireless security beyond password cracking by Mohit Ranjan
VPN (virtual private network)
Zetta: An API First Platform
Kafka on Kubernetes—From Evaluation to Production at Intuit
Site to-multi site open vpn solution. with active directory auth
Ad

More from GLC Networks (20)

PDF
Firewall mangle PBR: steering outbound path similar to inbound
PDF
Internal BGP tuning: Mesh peering to avoid loop
PDF
BGP tuning: Peer with loopback
PDF
BGP security tuning: pull-up route
PDF
BGP troubleshooting: route origin
PDF
Steering traffic in OSPF: Interface cost
PDF
Tuning OSPF: Bidirectional Forwarding Detection (BFD)
PDF
Tuning OSPF: Prefix Aggregate
PDF
Tuning OSPF: area hierarchy, LSA, and area type
PDF
Stable OSPF: choosing network type.pdf
PDF
Controlling Access Between Devices in the same Layer 2 Segment
PDF
GIT as Mikrotik Configuration Management
PDF
RouterOS Migration From v6 to v7
PDF
Building a Web Server with NGINX
PDF
EOIP Deep Dive
PDF
Policy Based Routing with Indirect BGP - Part 2
PDF
Policy Based Routing with Indirect BGP - Part 1
PDF
Internet Protocol Deep-Dive
PPTX
Automatic Backup via FTP - Part 2
PDF
Automatic Backup via FTP - Part 1
Firewall mangle PBR: steering outbound path similar to inbound
Internal BGP tuning: Mesh peering to avoid loop
BGP tuning: Peer with loopback
BGP security tuning: pull-up route
BGP troubleshooting: route origin
Steering traffic in OSPF: Interface cost
Tuning OSPF: Bidirectional Forwarding Detection (BFD)
Tuning OSPF: Prefix Aggregate
Tuning OSPF: area hierarchy, LSA, and area type
Stable OSPF: choosing network type.pdf
Controlling Access Between Devices in the same Layer 2 Segment
GIT as Mikrotik Configuration Management
RouterOS Migration From v6 to v7
Building a Web Server with NGINX
EOIP Deep Dive
Policy Based Routing with Indirect BGP - Part 2
Policy Based Routing with Indirect BGP - Part 1
Internet Protocol Deep-Dive
Automatic Backup via FTP - Part 2
Automatic Backup via FTP - Part 1

Recently uploaded (20)

PPT
Module 1.ppt Iot fundamentals and Architecture
PPTX
Chapter 5: Probability Theory and Statistics
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
Architecture types and enterprise applications.pdf
PDF
The influence of sentiment analysis in enhancing early warning system model f...
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
A review of recent deep learning applications in wood surface defect identifi...
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
OpenACC and Open Hackathons Monthly Highlights July 2025
PDF
sbt 2.0: go big (Scala Days 2025 edition)
PPTX
Modernising the Digital Integration Hub
PPTX
Benefits of Physical activity for teenagers.pptx
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
A proposed approach for plagiarism detection in Myanmar Unicode text
PDF
Hindi spoken digit analysis for native and non-native speakers
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
Consumable AI The What, Why & How for Small Teams.pdf
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
CloudStack 4.21: First Look Webinar slides
Module 1.ppt Iot fundamentals and Architecture
Chapter 5: Probability Theory and Statistics
NewMind AI Weekly Chronicles – August ’25 Week III
Zenith AI: Advanced Artificial Intelligence
Architecture types and enterprise applications.pdf
The influence of sentiment analysis in enhancing early warning system model f...
A comparative study of natural language inference in Swahili using monolingua...
A review of recent deep learning applications in wood surface defect identifi...
A contest of sentiment analysis: k-nearest neighbor versus neural network
OpenACC and Open Hackathons Monthly Highlights July 2025
sbt 2.0: go big (Scala Days 2025 edition)
Modernising the Digital Integration Hub
Benefits of Physical activity for teenagers.pptx
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
A proposed approach for plagiarism detection in Myanmar Unicode text
Hindi spoken digit analysis for native and non-native speakers
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
Consumable AI The What, Why & How for Small Teams.pdf
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
CloudStack 4.21: First Look Webinar slides

OpeVPN on Mikrotik