Page 1 of 1

SSH to VPN Server

Posted: Thu Sep 08, 2016 10:51 am
by danieldaniel
Hi everyone,

I'm trying to enable access to the VPN server (via SSH) for VPN clients - so that I can update the OS etc. without having to go onsite. It looks like I need to add a tap device and create a local bridge. I've read the manual but it is a little cryptic for me, and any forum post here I find is not helping.

So I went in and added another local bridge that bridges to the Virtual Hub. The new device gets a DHCP address from my router (I checked in ifconfig), I can SSH to that new address from the same subnet, but my VPN clients cannot ping it or connect to it. SecureNAT is disabled.

Has anyone done this before on a Pi and can explain how to do it? It doesn't have the option of adding a second NIC.

I am running the latest version on SoftEther on a Raspberry Pi 3.

Thanks,
Daniel

Re: SSH to VPN Server

Posted: Tue Sep 13, 2016 10:25 pm
by danieldaniel
I'm pulling my hair out over this!

I found this thread: http://www.vpnusers.com/viewtopic.php?f=7&t=4922 but it simply doesn't work for me. I run the script and the VPN Server drops off the network completely. I spent hours searching for an answer to this but to no avail. here is the script I run:

#!/bin/bash

ip link add br0 type bridge
ip link set tap_0 master br0
ip link set dev eth0 down
ip addr flush dev eth0
ip link set dev eth0 up
ip link set eth0 master br0
ip link set dev br0 up
ifconfig br0 192.168.1.240/24
ifconfig eth0 192.168.1.251
ifconfig tap_0 192.168.1.241



My VPN Server has the 192.168.1.251 address. As soon as I run the above everything goes dead and I have to restart the server to remove all that config.

I was hoping it would be so simple to SSH to my VPN Server to allow me to patch it remotely :-S

Any ideas anyone?

Re: SSH to VPN Server

Posted: Fri Sep 16, 2016 12:14 pm
by raafat
Is your server Unix-like server ?

Re: SSH to VPN Server

Posted: Mon Sep 19, 2016 12:45 pm
by danieldaniel
I gave up :-(

I bought a USB WiFi adaptor and added it to the server. As it now has 2 NICs I can SSH to the 2nd NIC over the VPN.

Re: SSH to VPN Server

Posted: Mon Sep 19, 2016 3:00 pm
by raafat
danieldaniel wrote:
> I gave up :-(
>
> I bought a USB WiFi adaptor and added it to the server. As it now has 2
> NICs I can SSH to the 2nd NIC over the VPN.

But What about connecting to a router and then from that router go back to your SE server ?

Are you running your SE server on a Unix-like server ?

Re: SSH to VPN Server

Posted: Tue Sep 20, 2016 8:45 am
by danieldaniel
raafat wrote:
> danieldaniel wrote:
> > I gave up :-(
> >
> > I bought a USB WiFi adaptor and added it to the server. As it now has 2
> > NICs I can SSH to the 2nd NIC over the VPN.
>
> But What about connecting to a router and then from that router go back to your SE
> server ?
>
> Are you running your SE server on a Unix-like server ?

Yes, I am running it on a Raspberry Pi 2 - which only has 1 NIC. Everything worked fine but I was unable to access it directly from a VPN client, from a local client it was fine. I tried bridging but couldn't get it working so ended up adding a NIC.

Re: SSH to VPN Server

Posted: Tue Oct 11, 2016 6:20 am
by thisjun
Please create 2 localbridges with tap and physical NIC.
And assign a IP address to tap.