Page 1 of 1

Port forwarding

Posted: Sat Jun 18, 2022 11:24 pm
by Revali
Hey,

I use Viscosity in combination with CyberGhost VPN and have set up a port forwarding for SSH on my router and Mac. It all works as long as I don't connect the Mac to the VPN, but unfortunately it stops working as soon as I connect my Mac to the VPN. How can I fix this?

Kind regards,
Revali

Re: Port forwarding

Posted: Mon Jun 20, 2022 5:29 am
by James
Hi Revali,

If you have setup port forwarding on your router (port forwarding a port from your router to your Mac), then you can try adding a route to your VPN connection to instruct that traffic to your router's internal IP address should go through your normal network connection. Please see:
https://www.sparklabs.com/support/kb/ar ... al-network

Cheers,
James

Re: Port forwarding

Posted: Mon Jun 20, 2022 7:54 am
by Revali
Hey,

thanks, I already read the article, but unfortunately it doesn't really help me if the clients from which a connection to the SSH server is established have dynamic IP addresses from different subnets. As far as I found out this only works if the clients (not the SSH server on the Mac that is also running Viscosity) have a static IP.

Kind regards,
Revali

Re: Port forwarding

Posted: Wed Jun 29, 2022 7:38 pm
by Revali
Hey,

I would love to get an answer or at least an idea or possible solution as to what to try or do instead. Otherwise I can really leave the support here.

Kind regards,
Revali

Re: Port forwarding

Posted: Thu Jun 30, 2022 9:12 pm
by James
I'm afraid there isn't much you can do from a VPN perspective, as it's happening outside of the VPN. A couple of ideas:

1. SSH into your Mac via its VPN's IP address. If the IP address isn't publicly accessible, this will likely mean port forwarding on the OpenVPN server. If your VPN address isn't static you may need to consider setting up something like dynamic DNS.

2. Have your router perform NAT on the LAN interface for the port forwarded SSH connections only. This will make it look like they come from your router's IP address, and so it's easy to route outside of the VPN connection.

Cheers,
James