Client for PPP+SSL VPN tunnel services

Lubomir Rintel 1d8af0d948 http: increase the HTTP buffer size 8 years ago
doc 77bbe24ab8 config: add --plugin option 8 years ago
etc f3ad7d2fc1 Add ability to use a config file 9 years ago
src 1d8af0d948 http: increase the HTTP buffer size 8 years ago
.gitignore 43ff6d5771 Update .gitignore 8 years ago
LICENSE 171cebae7d Initial commit 9 years ago
Makefile.am 32e269a83e build: fix make distcheck 8 years ago
README.md 6571e49038 Update README for Fedora dependencies 9 years ago
configure.ac 6f3b03ce2a Fix VERSION redefinition 9 years ago

README.md

openfortivpn

openfortivpn is a client for PPP+SSL VPN tunnel services. It spawns a pppd process and operates the communication between the gateway and this process.

It is compatible with Fortinet VPNs.

Examples

  • Simply connect to a VPN:
  openfortivpn vpn-gateway:8443 --username=foo
  • Don't set IP routes and don't add VPN nameservers to /etc/resolv.conf:
  openfortivpn vpn-gateway:8443 -u foo -p bar --no-routes --no-dns
  • Using a config file:
  openfortivpn

With /etc/openfortivpn/config containing:

  host = vpn-gateway
  port = 8443
  username = foo
  password = bar
  # X509 certificate sha256 sum, trust only this one!
  trusted-cert = e46d4aff08ba6914e64daa85bc6112a422fa7ce16631bff0b592a28556f993db

Building from source

  1. Install build dependencies.

    • Fedora: gcc automake autoconf openssl-devel
    • Ubuntu: automake autoconf libssl-dev
    • Debian: gcc automake autoconf libssl-dev
    • Arch Linux: automake autoconf openssl
    • Gentoo Linux: net-dialup/ppp

If You manage your kernel yourself, ensure to compile those modules:

  CONFIG_PPP=m
  CONFIG_PPP_ASYNC=m
  1. Build and install.

    aclocal && autoconf && automake --add-missing
    ./configure --prefix=/usr --sysconfdir=/etc
    make
    sudo make install
    

Running as root?

openfortivpn needs elevated privileges at three steps during tunnel set up:

  • when spawning a /usr/sbin/pppd process;
  • when setting IP routes through VPN (when the tunnel is up);
  • when adding nameservers to /etc/resolv.conf (when the tunnel is up).

For these reasons, you may need to use sudo openfortivpn. If you need it to be usable by non-sudoer users, you might consider adding an entry in /etc/sudoers.

For example: visudo -f /etc/sudoers.d/openfortivpn

Cmnd_Alias  OPENFORTIVPN = /usr/bin/openfortivpn

%adm       ALL = (ALL) OPENFORTIVPN

Contributing

Feel free to make pull requests!

C coding style should follow the Linux kernel Documentation/CodingStyle.