OpenVPN Client Setup

mkt server | linux client

assuming debian / ubuntu

Install

    apt install openvpn

Setup

make sure the server is available either by TCP or UDP

    nmap -sTUV -p 1194 VPN-SERVER -T4

e.g. for connecting to a MKT router

openvpn --show-ciphers | grep AES
vi USER.ovpn

client
dev tun
proto tcp-client
remote VPN-SERVER 1194
resolv-retry infinite
nobind
user nobody
group nogroup

persist-key
persist-tun
ping 15
ping-restart 45
ping-timer-rem
#keepalive 10 20

mute-replay-warnings

tls-client
remote-cert-tls server
ca LocalCA.crt
cert USER.crt
key USER.key

cipher AES-128-CBC
auth-user-pass USER.cfg
auth SHA1

verb 3

credentials go there

vi USER.cfg

USERNAME-HERE
PASSWORD-HERE

Ready to go

openvpn --config USER.ovpn

ENTER-PASSPHRASE

^Z
bg

ping 192.168.x.254
nmap -p 80,8443 192.168.x.254

and eventually if you need to reach some internal network over there

route add -net DESTINATION-CIDR gw 192.168.x.254

Resources

http://openvpn.net/howto.html#mitm

https://openvpn.net/faq/how-do-i-use-a-client-certificate-and-private-key-from-the-android-keychain/

Настройка VPN через MikroTik - OpenVPN https://lantorg.com/article/nastrojka-vpn-cherez-mikrotik-openvpn

OpenVPN With Mikrotik Not As Primary Router https://forum.mikrotik.com/viewtopic.php?t=184237 –> nice config


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5
Copyright © 2022 Pierre-Philipp Braun