ancwrd1 / snx-rs

Open source Linux client for Checkpoint VPN tunnels
GNU Affero General Public License v3.0
57 stars 5 forks source link
checkpoint client ipsec linux network rust snx vpn

Open Source Linux Client for Checkpoint VPN Tunnels

This project contains the source code for an unofficial Linux client for Checkpoint VPN, written in Rust. It is based on a reverse-engineered protocol from the vendor's application.

Why This Project

Unfortunately, my employer uses the popular-but-not-so-Linux-friendly Checkpoint VPN for remote access. This prompted me to create my own client.

Advantages Over the Official SNX Client for Linux

Implemented Features

System Requirements

GUI Usage

Command Line Usage

Check the Configuration Options section for a list of all available options.

Before the client can establish a connection, it must know the login (authentication) method to use (--login-type or -o option). To find the supported login types, run it with the -m info parameter:

snx-rs -m info -s remote.acme.com

This command will display the supported login types. Use the vpn_XXX identifier as the login type. If a certificate error is returned, try adding the -X true command line parameter to ignore certificate errors.

Example output (may differ for your server):

Supported tunnel protocols:
        IPSec
        SSL
        L2TP
Available login types:
        vpn_Microsoft_Authenticator (Microsoft Authenticator)
        vpn_Emergency_Access (Emergency Access)
        vpn_Username_Password (Username Password)
        vpn_Azure_Authentication (Azure Authentication)
        vpn (Standard)

There are two ways to use the application:

Certificate Authentication

There are four parameters that control certificate-based authentication:

Additional Usage Notes

Troubleshooting common problems

Error Solution
deadline has elapsed Check if the correct login type is specified (one of the vpn_XXX identifiers returned from the "-m info" command).
Unknown device type Check if the IPv6 protocol is enabled in the Linux kernel.
[0020] The user is not defined properly Application failed to negotiate IPSec encryption parameters. Usually it means that Checkpoint server is misconfigured with the obsolete insecure ciphers. Do not connect to it.
error sending request for url (https://IP_OR_HOSTNAME/clients/) + SSL-related stack trace VPN server certificate is self-signed or untrusted. Use ignore-server-cert parameter to disable all HTTPS certificate checks. Use no-cert-check to only disable hostname validation.
How do I logout from SAML SSO? Delete the ~/.config/snx-rs/cookies.db file

Contributing

Pull requests, bug reports, and suggestions are welcome. This is a hobby project I maintain in my free time. Adding a missing feature can be considered on a case-by-case basis but will require some testing efforts from the requester.

Building from Sources

A recent Rust compiler is required. Run cargo build --release to build the release version. If the GUI frontend is not needed, build it with cargo build --release --workspace --exclude snx-rs-gui.

Credits

Special thanks to the cpyvpn project for inspiration around SAML and IKEv1 exchange.

License

Licensed under the GNU Affero General Public License version 3.