Linux
It is possible to connect to the faculty VPN using one of the following methods.
If you have problems connecting to the faculty VPN, please use the Common problems section.
A. Using NetworkManager
- Install OpenVPN and its integration for NetworkManager using your system’s package manager.
- Arch Linux
pacman -S openvpn networkmanager-openvpn
- Debian / Ubuntu
apt install openvpn network-manager-openvpn-gnome
- Fedora
dnf install openvpn NetworkManager-openvpn-gnome
- Download configuration file for FIT VPN fit-vpn.ovpn.
Run the following sequence of commands to import and adjust the VPN profile:
nmcli connection import type openvpn file fit-vpn.ovpn 1 nmcli connection modify fit-vpn connection.permissions user:$USER 2 nmcli connection modify fit-vpn +ipv4.never-default true +ipv6.never-default true 3 nmcli connection modify fit-vpn +vpn.data username=<CVUT-USERNAME> 4
- Import OpenVPN profile from file fit-vpn.ovpn (you may need to use sudo).
- Allow only yourself to use this VPN connection (you may need to use sudo).
- Never use this VPN as your default gateway, i.e. avoid forwarding all the traffic to the VPN.
- Authenticate using your CTU username.
Connect to FIT VPN using the following command or via GUI. You should be prompted for a password – enter your FIT Password [1].
nmcli connection up fit-vpn
NetworkManager should store it in your system keyring and never ask it again
B. Manually using OpenVPN client
Upozornění:
This is not a recommended method. It is better to use some OpenVPN helper provided by your system (e.g. NetworkManager, ConnMan, init script, service…).
- Install OpenVPN using your system’s package manager.
- Arch Linux
pacman -S openvpn
- Debian / Ubuntu
apt install openvpn
- Fedora
dnf install openvpn
- Download configuration file for FIT VPN fit-vpn.ovpn.
Run openvpn with path to the configuration file fit-vpn.ovpn. You will be prompted for a username and password – enter your CTU username and FIT Password [1].
sudo openvpn --config fit-vpn.ovpn
C. Using ConnMan
- Install OpenVPN, and possible OpenVPN plugin for ConnMan, using your system’s package manager.
- Arch Linux
sudo pacman -S openvpn
- Debian / Ubuntu
sudo apt install openvpn connman-vpn
Create user and group
openvpn
, if they don’t exist yet.sudo useradd --home-dir /var/empty --no-create-home --system --shell /sbin/nologin --user-group openvpn
Configure ConnMan VPN to run OpenVPN client as user
openvpn
– create configuration file/etc/connman/vpn-plugin/openvpn.conf
with:[DACPrivileges] User=openvpn Group=openvpn
- Download configuration file for FIT VPN fit-vpn.ovpn and move it e.g. into directory
/etc/openvpn
. In the aforesaid file
/etc/openvpn/fit-vpn.ovpn
, set directiveauth-user-pass
to/etc/openvpn/fit-vpn.pass
:sudo sed -i 's|^auth-user-pass|& /etc/openvpn/fit-vpn.pass|' /etc/openvpn/fit-vpn.ovpn
Create file
/etc/openvpn/fit-vpn.pass
readable just for the userroot
and groupopenvpn
. Write your CTU username on the first line (substitute<CVUT-USERNAME>
) and FIT Password [1] on the second line (substitute<PASSWORD>
):printf '%s\n%s\n' '<CVUT-USERNAME>' '<PASSWORD>' | sudo install -D -m 640 -o root -g openvpn /dev/stdin /etc/openvpn/fit-vpn.pass
Create provisioning file
/var/lib/connman-vpn/fit-vpn.config
for ConnMan VPN:[provider_openvpn] Type=OpenVPN Name=FIT VPN Host=vpn.fit.cvut.cz OpenVPN.DeviceType=tun OpenVPN.ConfigFile=/etc/openvpn/fit-vpn.ovpn
Connect to FIT VPN using the following command or via GUI.
connmanctl connect vpn_vpn_fit_cvut_cz
If an error message appears that the “Connect” method doesn’t exist on the “net.connman.Service” interface, it means that ConnMan hasn’t detected a new VPN configuration for whatever reason.
In that case, or even on another error, try restarting connmand
.
Then check that the command connmanctl vpnconnections
displays “FIT VPN” and check the logs.
To exclude an error on the ConnMan side, try to connect directly using the OpenVPN client: sudo openvpn --config /etc/openvpn/fit-vpn.ovpn
.
Common problems
Logging in
If you are unable to log in to the faculty VPN, make sure that you are logging in with your CTU username and FIT password.
DNS address translation
If access to servers in the *.in.fit.cvut.cz
domain will not work for you (DNS address translation does not work), use the following procedure:
- Install the OpenVPN client according to procedure B.
- Install the following package:
- Debian / Ubuntu
sudo apt install openvpn-systemd-resolved
Download the fit-vpn.ovpn configuration file and add the following lines to it:
script-security 2 setenv PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin up /etc/openvpn/update-systemd-resolved up-restart down /etc/openvpn/update-systemd-resolved down-pre
Use sudo to run OpenVPN with the path to the configuration file. When prompted, log in with your CTU username and FIT password.
sudo openvpn --config fit-vpn.ovpn
- FIT Password is not CTU Password! You can change your FIT Password in ICT profile. More about FIT Password via FIT password. ↩