Authentication

These scenarios show how to configure OpenVPN tunnel authentication using the different methods supported by the AAA system

Local

Description

This scenario shows how to set up authentication using the local user database

Scenario

Step 1: Set the following configuration in DUT0:

set interfaces ethernet eth0 address 192.168.100.1/24
set interfaces openvpn ovpn1 local-endpoint 10.0.0.0/29
set interfaces openvpn ovpn1 mode server server-profile SRV
set interfaces openvpn ovpn1 mode server tls-profile TLS
set system aaa list auth method 1 local
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set vpn openvpn server-profile SRV authentication auth
set vpn openvpn tls-profile TLS ca 'running://ca.crt'
set vpn openvpn tls-profile TLS certificate 'running://server.crt'
set vpn openvpn tls-profile TLS dhparam 'running://dh.pem'
set vpn openvpn tls-profile TLS private-key 'running://server.priv.pem'

Step 2: Set the following configuration in DUT1:

set interfaces ethernet eth0 address 192.168.100.2/24
set interfaces openvpn ovpn1 mode client client-profile CNT
set interfaces openvpn ovpn1 mode client tls-profile TLS
set interfaces openvpn ovpn1 peer 1 address 192.168.100.1
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set vpn openvpn client-profile CNT authentication encrypted-password U2FsdGVkX19Rd7+MthgKnhU8zjzuVtIs1Z/MDKWlzIo=
set vpn openvpn client-profile CNT authentication username admin
set vpn openvpn tls-profile TLS ca 'running://ca.crt'
set vpn openvpn tls-profile TLS certificate 'running://client.crt'
set vpn openvpn tls-profile TLS private-key 'running://client.priv.pem'

Step 3: Ping IP address 192.168.100.2 from DUT0:

admin@DUT0$ ping 192.168.100.2 count 1 size 56 timeout 1
Show output
PING 192.168.100.2 (192.168.100.2) 56(84) bytes of data.
64 bytes from 192.168.100.2: icmp_seq=1 ttl=64 time=0.381 ms

--- 192.168.100.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.381/0.381/0.381/0.000 ms

Step 4: Run command interfaces openvpn ovpn1 status at DUT1 and check if output contains the following tokens:

CONNECTED
Show output
OpenVPN interface ovpn1
State: CONNECTED (SUCCESS)
Local endpoint: 10.0.0.2:1194
Remote: 192.168.100.1

Step 5: Ping IP address 10.0.0.1 from DUT1:

admin@DUT1$ ping 10.0.0.1 count 1 size 56 timeout 1
Show output
PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.
64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=0.661 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.661/0.661/0.661/0.000 ms

Radius

Description

This scenario shows how to set up authentication using a remote RADIUS server

Scenario

Step 1: Set the following configuration in DUT0:

set interfaces ethernet eth0 address 192.168.100.1/24
set interfaces ethernet eth1 address 10.215.168.64/24
set interfaces openvpn ovpn1 local-endpoint 10.0.0.0/29
set interfaces openvpn ovpn1 mode server server-profile SRV
set interfaces openvpn ovpn1 mode server tls-profile TLS
set system aaa group radius radgroup server radserver
set system aaa list auth method 1 group radius radgroup
set system aaa server radius radserver address 10.215.168.1
set system aaa server radius radserver encrypted-key U2FsdGVkX18C5X4D4pJvvLzXdy60OzeWJI33Jvl4hJerAQcslYORsij2Lqy90M684Lj2yRtcfCA7cUrUmbxZIQ==
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set vpn openvpn server-profile SRV authentication auth
set vpn openvpn tls-profile TLS ca 'running://ca.crt'
set vpn openvpn tls-profile TLS certificate 'running://server.crt'
set vpn openvpn tls-profile TLS dhparam 'running://dh.pem'
set vpn openvpn tls-profile TLS private-key 'running://server.priv.pem'

Step 2: Set the following configuration in DUT1:

set interfaces ethernet eth0 address 192.168.100.2/24
set interfaces openvpn ovpn1 mode client client-profile CNT
set interfaces openvpn ovpn1 mode client tls-profile TLS
set interfaces openvpn ovpn1 peer 1 address 192.168.100.1
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set vpn openvpn client-profile CNT authentication encrypted-password U2FsdGVkX1+dPGt5egqHf8FMkxfOKKk4vVhNhSm1RKw=
set vpn openvpn client-profile CNT authentication username testing
set vpn openvpn tls-profile TLS ca 'running://ca.crt'
set vpn openvpn tls-profile TLS certificate 'running://client.crt'
set vpn openvpn tls-profile TLS private-key 'running://client.priv.pem'

Step 3: Ping IP address 10.215.168.1 from DUT0:

admin@DUT0$ ping 10.215.168.1 count 1 size 56 timeout 1
Show output
PING 10.215.168.1 (10.215.168.1) 56(84) bytes of data.
64 bytes from 10.215.168.1: icmp_seq=1 ttl=64 time=0.298 ms

--- 10.215.168.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.298/0.298/0.298/0.000 ms

Step 4: Ping IP address 192.168.100.2 from DUT0:

admin@DUT0$ ping 192.168.100.2 count 1 size 56 timeout 1
Show output
PING 192.168.100.2 (192.168.100.2) 56(84) bytes of data.
64 bytes from 192.168.100.2: icmp_seq=1 ttl=64 time=0.361 ms

--- 192.168.100.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.361/0.361/0.361/0.000 ms

Step 5: Run command interfaces openvpn ovpn1 status at DUT1 and check if output contains the following tokens:

CONNECTED
Show output
OpenVPN interface ovpn1
State: CONNECTED (SUCCESS)
Local endpoint: 10.0.0.2:1194
Remote: 192.168.100.1

Step 6: Ping IP address 10.0.0.1 from DUT1:

admin@DUT1$ ping 10.0.0.1 count 1 size 56 timeout 1
Show output
PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.
64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=0.859 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.859/0.859/0.859/0.000 ms

Tacacs

Description

This scenario shows how to set up authentication using a remote TACACS+ server

Scenario

Step 1: Set the following configuration in DUT0:

set interfaces ethernet eth0 address 192.168.100.1/24
set interfaces ethernet eth1 address 10.215.168.64/24
set interfaces openvpn ovpn1 local-endpoint 10.0.0.0/29
set interfaces openvpn ovpn1 mode server server-profile SRV
set interfaces openvpn ovpn1 mode server tls-profile TLS
set system aaa group tacacs tacgroup server tacserver
set system aaa list auth method 1 group tacacs tacgroup
set system aaa server tacacs tacserver address 10.215.168.1
set system aaa server tacacs tacserver encrypted-key U2FsdGVkX1/dnMTQMrO03ZmuF7eiKXTc56aduh7BIMs=
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set vpn openvpn server-profile SRV authentication auth
set vpn openvpn tls-profile TLS ca 'running://ca.crt'
set vpn openvpn tls-profile TLS certificate 'running://server.crt'
set vpn openvpn tls-profile TLS dhparam 'running://dh.pem'
set vpn openvpn tls-profile TLS private-key 'running://server.priv.pem'

Step 2: Set the following configuration in DUT1:

set interfaces ethernet eth0 address 192.168.100.2/24
set interfaces openvpn ovpn1 mode client client-profile CNT
set interfaces openvpn ovpn1 mode client tls-profile TLS
set interfaces openvpn ovpn1 peer 1 address 192.168.100.1
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set vpn openvpn client-profile CNT authentication encrypted-password U2FsdGVkX18pLRfzQxulY0hckQjBg0okzRR3UzuXcAA=
set vpn openvpn client-profile CNT authentication username testing
set vpn openvpn tls-profile TLS ca 'running://ca.crt'
set vpn openvpn tls-profile TLS certificate 'running://client.crt'
set vpn openvpn tls-profile TLS private-key 'running://client.priv.pem'

Step 3: Ping IP address 10.215.168.1 from DUT0:

admin@DUT0$ ping 10.215.168.1 count 1 size 56 timeout 1
Show output
PING 10.215.168.1 (10.215.168.1) 56(84) bytes of data.
64 bytes from 10.215.168.1: icmp_seq=1 ttl=64 time=0.125 ms

--- 10.215.168.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.125/0.125/0.125/0.000 ms

Step 4: Ping IP address 192.168.100.2 from DUT0:

admin@DUT0$ ping 192.168.100.2 count 1 size 56 timeout 1
Show output
PING 192.168.100.2 (192.168.100.2) 56(84) bytes of data.
64 bytes from 192.168.100.2: icmp_seq=1 ttl=64 time=0.333 ms

--- 192.168.100.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.333/0.333/0.333/0.000 ms

Step 5: Run command interfaces openvpn ovpn1 status at DUT1 and check if output contains the following tokens:

CONNECTED
Show output
OpenVPN interface ovpn1
State: CONNECTED (SUCCESS)
Local endpoint: 10.0.0.2:1194
Remote: 192.168.100.1

Step 6: Ping IP address 10.0.0.1 from DUT1:

admin@DUT1$ ping 10.0.0.1 count 1 size 56 timeout 1
Show output
PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.
64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=0.715 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.715/0.715/0.715/0.000 ms