Automating through terminal/node.js

How to customize and extend your OpenVPN installation.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
dead
OpenVpn Newbie
Posts: 1
Joined: Sun Dec 24, 2023 8:05 pm

Automating through terminal/node.js

Post by dead » Sun Dec 24, 2023 9:12 pm

I'm trying to automate connecting to and disconnecting from different configs through my node.js app.
I'm doing this under an Arch Linux VM and I've done it on my Windows 10 and it all works fine.

So far I've done this through shell commands, disconnecting by `killall openvpn` and running my node app as sudo to connect with `openvpn —config ...config.ovpn —auth-user-pass ....auth.txt —log-append ...logfile.log`
This works so far and I'm able to connect to the VPN and confirm that I'm connected by checking my IP through ipinfo.io but many of the http requests my browser makes fail, I'm assuming this is related to this error I'm getting in my log file:
read UDPv4 [ENETUNREACH]: Network is unreachable (fd=3,code=101)

I'd appreciate any help on how I could get rid of this error and make the vpn connection work as good on my Arch Linux VM as it does on my Windows VM

Here are some things that may be helpful from my ovpn file:
client
dev tun
proto udp
remote 194.xxx.xx.xx 1194
resolv-retry infinite
remote-random
nobind
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
persist-key
persist-tun
ping 15
ping-restart 0
ping-timer-rem
reneg-sec 0
comp-lzo no
verify-x509-name CN=...
verb 3
pull
fast-io
cipher AES-256-CBC
auth SHA512

Post Reply