Estou tentando executar o console Cisco VPN client
no Docker.
Eu começo o container assim:
docker run -it -v /srv/vpn/keys/:/root/keys/ --network=host --cap-add=NET_ADMIN --device=/dev/net/tun -v /dev/net/tun:/dev/net/tun vpn-vpnc-client_img
E, em seguida, execute o cliente vpnc
dentro do contêiner do Docker
vpnc-connect /root/keys/vpnc.conf --local-port 0
Produz a seguinte saída:
Cannot open "/proc/sys/net/ipv4/route/flush": Read-only file system
Cannot open "/proc/sys/net/ipv4/route/flush": Read-only file system
Cannot open "/proc/sys/net/ipv4/route/flush": Read-only file system
Cannot open "/proc/sys/net/ipv4/route/flush": Read-only file system
Cannot open "/proc/sys/net/ipv4/route/flush": Read-only file system
Cannot open "/proc/sys/net/ipv4/route/flush": Read-only file system
Cannot open "/proc/sys/net/ipv4/route/flush": Read-only file system
Cannot open "/proc/sys/net/ipv4/route/flush": Read-only file system
Cannot open "/proc/sys/net/ipv4/route/flush": Read-only file system
Cannot open "/proc/sys/net/ipv4/route/flush": Read-only file system
Cannot open "/proc/sys/net/ipv4/route/flush": Read-only file system
Cannot open "/proc/sys/net/ipv4/route/flush": Read-only file system
Cannot open "/proc/sys/net/ipv4/route/flush": Read-only file system
Cannot open "/proc/sys/net/ipv4/route/flush": Read-only file system
Cannot open "/proc/sys/net/ipv4/route/flush": Read-only file system
Cannot open "/proc/sys/net/ipv4/route/flush": Read-only file system
VPNC started in background (pid: 257)...
vpnc
conecta e cria rotas adequadas, portanto a VPN parece funcionar. Minha preocupação é a mensagem de aviso.
De acordo com a documentação, para /proc/sys/net/ipv4/route/flush
Writing to this file results in a flush of the routing cache.
Eu não entendo essa afirmação. É essencial que o cache de roteamento não seja liberado?
Além disso, pelo que entendi, posso emitir
echo 1 > /proc/sys/net/ipv4/route/flush
manualmente após o início do contêiner. Mas eu uso monit
dentro do contêiner do docker para reiniciar o vpnc
se a conexão for perdida. Posso vincular a montagem /proc/sys/net/ipv4/route/flush
do host dentro do contêiner de alguma forma e emitir o comando para esvaziar o cache de roteamento do script monit dentro do contêiner?