Access DTU campus network using VPN from Linux

From Rsewiki
Revision as of 20:56, 9 November 2023 by Sh (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The purpose is to allow (some) access to servers, e.g. MATLAB license server, using a VPN (Virtual Private Network).

Install (Ubuntu/kubuntu)

Install the following packages:

sudo apt-get install openconnect vpnc

Open connection

UPDATE: 2023-11-09, Use extra flag --useragent=AnyConnect

UPDATE: 2021-12-06, New VPN server with address https://vpn.dtu.dk, use extra flag --os=win

Run the following command:

sudo openconnect --os=win --useragent=AnyConnect --script /etc/vpnc/vpnc-script https://vpn.dtu.dk/

or

sudo openconnect --os=win --useragent=AnyConnect --script /etc/vpnc/vpnc-script https://extra-vpn.ait.dtu.dk/

(supply password for SUDO, and your logon credentials to campusnet when prompted)

NOTE: On newer versions of Ubuntu Linux the vpnc scripts are in the folder: /usr/share/vpnc-scripts/vpnc-script

Now you have a new network connection, check with ifconfig:

ifconfig
eth1     Link encap:Ethernet  HWaddr 00:1c:c0:81:cc:dd  
         ...
lo       Link encap:Local Loopback  
         inet addr:127.0.0.1  Mask:255.0.0.0
         ...
tun0     Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
         inet addr:10.13.28.17  P-t-P:10.13.28.17  Mask:255.255.255.255
         UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1406  Metric:1
         RX packets:14 errors:0 dropped:0 overruns:0 frame:0
         TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:500 
         RX bytes:1201 (1.2 KB)  TX bytes:1480 (1.4 KB)

If you installed MATLAB as described in http://downloads.cc.dtu.dk/# then you should now be able to run MATLAB using your DTU license.