Jump to content
Not connected, Your IP: 3.145.43.200
Sign in to follow this  
Soli

VPN over dedi box (ssh connection lost)

Recommended Posts

Hey there I recently got myself a dedi box for torrenting and stuff and I would like to redirect all traffic through a VPN.

 

I managed to get eddie installed on Ubuntu 18.10 but whenever I try to connect to a server it just lags and eventually disconnects. 

Enabling network lock also kills my SSH connection/VNC connection and I can't ssh into it until I reboot.

 

 

What I need: 

Being able to SSH into the box from my laptop and desktop while the box is connected to a VPN. Also when its not connected to the VPN.

 

I've searched through the forums and read something about configuring "routes" in the settings but it didn't work.

 

How can I set this mess up? Any help would be appreciated!

 

Thnx in advance.

 

Logs:

. 2019.03.05 16:40:12 - OpenVPN Driver - Found, /dev/net/tun
. 2019.03.05 16:40:12 - OpenVPN - Version: 2.4.6 - OpenSSL 1.1.1  11 Sep 2018, LZO 2.10 (/usr/sbin/openvpn)
. 2019.03.05 16:40:12 - SSH - Version: OpenSSH_7.7p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017 (/usr/bin/ssh)
. 2019.03.05 16:40:12 - SSL - Version: stunnel 5.44 (/usr/bin/stunnel4)
. 2019.03.05 16:40:12 - curl - Version: 7.61.0 (/usr/bin/curl)
. 2019.03.05 16:40:12 - Certification Authorities: /usr/share/eddie-ui/cacert.pem
. 2019.03.05 16:40:12 - Updating systems & servers data ...
I 2019.03.05 16:40:12 - Ready
. 2019.03.05 16:40:12 - Systems & servers data update completed
I 2019.03.05 16:40:33 - Session starting.
I 2019.03.05 16:40:33 - Checking authorization ...
! 2019.03.05 16:40:33 - Connecting to Edasich (Netherlands, Alblasserdam)
. 2019.03.05 16:40:33 - OpenVPN > OpenVPN 2.4.6 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Sep  3 2018
. 2019.03.05 16:40:33 - OpenVPN > library versions: OpenSSL 1.1.1  11 Sep 2018, LZO 2.10
. 2019.03.05 16:40:33 - Connection to OpenVPN Management Interface
. 2019.03.05 16:40:33 - OpenVPN > MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:3100
. 2019.03.05 16:40:33 - OpenVPN > Outgoing Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
. 2019.03.05 16:40:33 - OpenVPN > Outgoing Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
. 2019.03.05 16:40:33 - OpenVPN > Incoming Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
. 2019.03.05 16:40:33 - OpenVPN > Incoming Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
. 2019.03.05 16:40:33 - OpenVPN > TCP/UDP: Preserving recently used remote address: [AF_INET]213.152.161.213:443
. 2019.03.05 16:40:33 - OpenVPN > Socket Buffers: R=[212992->212992] S=[212992->212992]
. 2019.03.05 16:40:33 - OpenVPN > UDP link local: (not bound)
. 2019.03.05 16:40:33 - OpenVPN > UDP link remote: [AF_INET]213.152.161.213:443
. 2019.03.05 16:40:33 - OpenVPN > MANAGEMENT: Client connected from [AF_INET]127.0.0.1:3100
. 2019.03.05 16:41:05 - OpenVPN > [UNDEF] Inactivity timeout (--ping-exit), exiting
. 2019.03.05 16:41:05 - OpenVPN > SIGTERM received, sending exit notification to peer
. 2019.03.05 16:41:11 - OpenVPN > SIGTERM[soft,exit-with-notification] received, process exiting
! 2019.03.05 16:41:11 - Disconnecting
. 2019.03.05 16:41:11 - Connection terminated.

 

Share this post


Link to post

See this:

 

https://airvpn.org/topic/12274-ubuntu-vm-cant-connect-through-openvpn/?p=44812

 

...

For completeness, the comments below may help demonstrate what the issue is.

 

As quick and dirty way to sustain the SSH connection, add a routing table entry to direct traffic to your SSH client over the original gateway. Something like this:

sudo route add -host 111.222.333.444 gw 555.666.777.1
 

There, "111.222.333.444" would be the address you connected from (as shown when you do "echo $SSH_CLIENT"), and "555.666.777.1" is the original default gateway (the entry with a "Genmask" of "0.0.0.0" when you do "/sbin/route -n").

 

SSH connections from anywhere else will still fail.

...

 

You need that route set up before you start the VPN. There are more complete solutions there too.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image
Sign in to follow this  

×
×
  • Create New...