Beispiel #1
0
def stop_vpn(running_connection):
    if running_connection == OPENVPN_CONNECTION_STRING:
        subprocess.call(["sudo", "killall", "openvpn"])
    elif running_connection == IPSEC_CONNECTION_STRING:
        ikev2_disconnect()
    elif running_connection == NM_CONNECTION_STRING:
        nm_disconnect()

    return
Beispiel #2
0
def stop_vpn(running_connection):
    if running_connection == OPENVPN_CONNECTION_STRING:
        openvpn_stop()
    elif running_connection == IPSEC_CONNECTION_STRING:
        ikev2_disconnect()
    elif running_connection == NM_CONNECTION_STRING:
        nm_disconnect()

    return
Beispiel #3
0
def test_ipsec_disconnection():
    ikev2.ikev2_disconnect()

    assert ip_show() == initial_ip