I noticed how there are several similar questions but none made me reach the objective.
My goal is to connect my Ubuntu machine to a remote checkpoint VPN. It looks like no VPN client exists to connect directly.
What I did:
- I built a Windows VM locally with Oracle VirtualBox.
- I connect the guest to the VPN.
As a Step 3, I would like to connect the host to the guest VPN but I wasn't able to achieve this.
I set up a NAT network and Host-only network:
- Host: Ubuntu 16.04
- Guest: Win 10 Home
Guest Host-only network: ipv4 192.168.56.101 gw 192.168.56.1 sub 255.255.255.0
Oracle VirtualBox 5.2.8
Target example VPN subnet: 123.123.0.0/24
I tried editing my default (host) gateway as How to share a VPN connection in a VMWare Guest VM with the Host:
sudo add route default 192.168.56.101
... looks fine but doesn't work.
I tried saving a route in /etc/networking/routes
123.123.0.0 255.255.255.0 192.168.56.101 any
... still not working.
I tried with iptables:
FORWARD
ACCEPT all -- 123.123.0.0/24 anywhere ctstate NEW
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
I tried this https://www.expressvpn.com/support/vpn-setup/share-vpn-connection-windows/ from the guest but can't start the hostednetwork for some reason.
I'm really out of ideas now. I can setup a different Windows physical computer on the same WiFi, if that can help.
EDIT:
At first I actually tried snx solution, this is what the console displays
# snx -s 123.123.123.123 -u username -g
Check Point's Linux SNX
build 800005013
Please enter your password:
SNX: Authentication failed
while these are the logs in snx.elg
[ 17505 -140036352]@riccardo-notebook[11 May 8:34:03] exists_in_buf: returning 1
[ 17505 -140036352]@riccardo-notebook[11 May 8:34:03] snx_browser::Receive: state==FIRST_REQ
[ 17505 -140036352]@riccardo-notebook[11 May 8:34:03] search_for: searching for SESSION_ID= and ;
[ 17505 -140036352]@riccardo-notebook[11 May 8:34:03] search_for: prefix not found!
[ 17505 -140036352]@riccardo-notebook[11 May 8:34:03] parse_page_for_sessionid: session_id not found!
[ 17505 -140036352]@riccardo-notebook[11 May 8:34:03] snx: quit.
[ 17505 -140036352]@riccardo-notebook[11 May 8:34:03] snx_browser::~snx_browser: called
[ 17505 -140036352]@riccardo-notebook[11 May 8:34:03] talkssl::~talkssl: delete link
[ 17505 -140036352]@riccardo-notebook[11 May 8:34:03] talkssl::end_handler: ending connection
[ 17505 -140036352]@riccardo-notebook[11 May 8:34:03] snx_browser::Failure: entering with code: 2
[ 17505 -140036352]@riccardo-notebook[11 May 8:34:03] got link down!- exit
[ 17505 -140036352]@riccardo-notebook[11 May 8:34:03] talkssl::~talkssl: end
[ 17505 -140036352]@riccardo-notebook[11 May 8:34:03] done