I’ve got 2 problems:
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.
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:
resolves a problem, but we are looking for other solution or info what causes this problem.
Any help is appreciated.