dlenski / vpn-slice

vpnc-script replacement for easy and secure split-tunnel VPN setup
GNU General Public License v3.0
726 stars 87 forks source link

Connect to IP on non http/s ports #123

Closed danielnetop closed 1 year ago

danielnetop commented 1 year ago

Hi, I have this couple of separate IPs that I added to my slice script, some of them are for some k8s clusters to access them, and I can access them without an issue (server: https://xx.xx.xxx.xxx), however when trying to access some databases directly (only accessible on corporate VPN) I don't have such luck and I have a timeout when trying to connect. The database connection is instancePublicIP:5432 Is this possible related with the fact that it's not using the normal http/s ports?

dlenski commented 1 year ago

Is this possible related with the fact that it's not using the normal http/s ports?

No. The routing table changes applied by vpn-slice happen at the level of IPv4/IPv6 (the Internet Protocol). The TCP protocol (port XYZ) runs above that, and the HTTP/S protocol is above that.

So no, it's not possible that traffic to some port(s) is getting routed correctly, and others not… at least not without other software besides vpn-slice being involved here.

danielnetop commented 1 year ago

Thank you for your reply, I'll keep trying some other ways, if the cluster works, the database should work as well, I'll thinker with it and hopefully I can find the reason

danielnetop commented 1 year ago

It was a bad configuration on the GCP side, there's multiple gateways for the openconnect connection, and the one I was connected to was not whitelisted.