Hi. I performed an OpenVPN Server configuration, using the following commands:
1. I created certificates and I exported them:
/certificate add common-name=“CA” key-size=4096 days-valid=3650 key-usage=crl-sign,key-cert-sign
/certificate sign CA ca-crl-host=127.0.0.1 name=“CA”
(but I also tried to use 192.168.1.1 or DDNS address, instead of 127.0.0.1)
/certificate add name=server common-name=“server” key-size=4096 days-valid=3650 key-usage=digital-signature,key-encipherment,tls-server
/certificate sign server ca=“CA” name=“server”
/certificate add name=client common-name=“client” key-size=4096 days-valid=3650 key-usage=tls-client
/certificate sign client ca=“CA” name=“client”
/certificate export-certificate CA export-passphrase=“”
/certificate export-certificate client export-passphrase=12345678
2.I defined ip pool and server
/ip pool
add name=ovpn ranges=192.168.2.2-192.168.2.254
/ip dhcp-server network
add address=192.168.2.0/24 comment=vpn dns-server=8.8.8.8 gateway=192.168.2.1 netmask=24
3. I created PPP profile and user
/ppp profile
add bridge=bridge2 dns-server=192.168.2.1 local-address=ovpn name=open_vpn remote-address=ovpn use-compression=no use-encryption=required
/interface ovpn-server server set certificate=server cipher=blowfish128,aes128,aes192,aes256 default-profile=open_vpn enabled=yes require-client-certificate=yes
/ppp secret
add name=client password=12345678 profile=open_vpn service=ovpn
4.I defined firewall rule
/ip firewall filter
add action=accept chain=input comment=VPN dst-port=xxxxx protocol=tcp
I managed to connect inside my vpn (using both my lan and lte hotpost) but in any case, I can’t use internet navigation. The only traffic allowed is inside the LAN network (I can reach my nas, my mikrotik router) but not external.
I’m using a macbook pro with tunnelblick (in which I tried to enable/disable the option “route all IPv4 traffic through the VPN” but nothing. I also tried from others networks or using other OS. The vpn works but not external internet traffic. If I try to use OpenVPN Client Connect, it’s impossible to connect or to import .ovpn config on macos, while on windows I can, but without external internet access).Any advice to solve ?
This is my vpn client config:
client
dev tun
proto tcp-client
remote DDNS Address
port xxxxx
nobind
persist-key
persist-tun
tls-client
remote-cert-tls server
ca CA.crt
cert client.crt
key client.key
verb 4
mute 10
cipher AES-256-CBC
auth SHA1
auth-user-pass auth.cfg
auth-nocache
redirect-gateway def1