Announcement

Collapse
No announcement yet.

NetworkManager fails VPN

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    NetworkManager fails VPN

    This is, for me, a tricky one. Appreciate any help. Upgraded to 20.04 a while ago and and have had this problem since.

    When I use CLI to establish a connection to a Cisco AnyConnect FW with "sudo openconnect --user=myuser vpn.whatever.se" everything works just fine. Without sudo no luck.
    When I try to use Network Manager GUI to establish a connection to a Cisco AnyConnect I am not able to reach anything on the other end.

    ip route gives me a hint. With sudo I get two more devices "xxx.yyy.zzz.21 dev tun0 scope link" and "xxx.yyy.zzz.22 dev tun0 scope link".
    Without sudo and with Network manager these devices do not exist.
    Without sudo I get a message about missing privileges.
    It looks to me as if Network Manager have lost privileges to create tun devices.

    Where should I look further?
    CLI works, but I do prefer GUI for this kind of simple things.

    #2
    How about making a systemd service? I did that for my ipv6 hurricane tunnel.
    THe ExecStart commands are what I'd use to create the tunnel and the ExecStop commands are what I'd use to destroy the tunnel.
    I put the he-ipv6.service script in /etc/systemd/system/

    Code:
    #he-ipv6.service 
    # tunnel ip address is supplied by hurricane electric
    # X, Y and Z are parts of the ipv6 address given to you by hurricane eletric.
    # IF you are doing dhcp behind a NAT router then use your local lan IP and use your MAC address to make the router give you the same IP at every login
    
    [Unit]
    Description=he.net IPv6 tunnel
    After=network.target
    
    [Service]
    Type=oneshot
    RemainAfterExit=yes
    ExecStart=/bin/ip tunnel add he-ipv6 mode sit remote "tunnel-ip address" local 192.168.11.100 ttl 255
    ExecStart=/bin/ip link set he-ipv6 up mtu 1480
    ExecStart=/bin/ip addr add 2001:X:Y:Z::2 dev he-ipv6
    ExecStart=/bin/ip -6 route add ::/0 dev he-ipv6
    ExecStop=/bin/ip -6 route del ::/0 dev he-ipv6
    ExecStop=/bin/ip link set he-ipv6 down
    ExecStop=/bin/ip tunnel del he-ipv6
    
    [Install]
    WantedBy=multi-user.target
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment

    Working...
    X