Docker Community Forums

Share and learn in the Docker community.

CISCO Anyconnect VPN problems

Hi,
I’ve got 2 problems:

  1. In company, we are using Cisco VPN Anyconnect as a VPN solution, when VPN session is established, I got a connection to internal hosts, but when I run container, contaiter can not connect to internal resources, traffic is not routed to internal VPN networks, no ping, no telnet, nothing. It works using openvpn, but cisco anyconnect vpn is mandatory, so i’m looking for solution for docker containers connectivity when using cisco vpn. Adding --net=host and rule iptables -I FORWARD -j ACCEPT sorts this problem out, but it is only temporary solution, not the one i am looking for.

  2. Second problem is with DNS: According do documentation, when container is created, its resolv.conf file should be copied from host, in my scenario, these files are not equal, so docker containers can not resolve internal hostnames - any solution? We’ve found that: adding --dns <dns.server> flag or adding to /etc/docker/deamon.json:
    {
    “dns”: ["dns.server.ip]
    }
    resolves a problem, but we are looking for other solution or info what causes this problem.

Ubuntu 20.04.3

Any help is appreciated.