Ssh on vm stops working due to docker enabling ip tables on vm

Hi All,
Can anyone please help on how iptables get effected after installing docker ?
Docker when installed on my vm it enables ip tables and than ssh connection to vm stops.
If i disable ip tables docker stop working .

[ 1738.598727] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

[ 1738.610411] IPv6: ADDRCONF(NETDEV_CHANGE): veth654d238: link becomes ready

[ 1738.625435] br-cab7ed318ee4: port 2(veth654d238) entered blocking state

[ 1738.637966] br-cab7ed318ee4: port 2(veth654d238) entered forwarding state

[ 1738.699409] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

[ 1738.714043] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

[ 1738.734093] IPv6: ADDRCONF(NETDEV_CHANGE): veth7281672: link becomes ready

[ 1738.753801] br-cab7ed318ee4: port 3(veth7281672) entered blocking state

[ 1738.761895] br-cab7ed318ee4: port 3(veth7281672) entered forwarding state

[ 1738.856761] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

[ 1738.876116] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

[ 1738.887368] IPv6: ADDRCONF(NETDEV_CHANGE): vethbdd82ce: link becomes ready

[ 1738.898622] br-cab7ed318ee4: port 4(vethbdd82ce) entered blocking state

[ 1738.913431] br-cab7ed318ee4: port 4(vethbdd82ce) entered forwarding state

[ 1739.038371] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

[ 1739.056621] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

[ 1739.070064] IPv6: ADDRCONF(NETDEV_CHANGE): vethf55cea1: link becomes ready

[ 1739.081871] br-cab7ed318ee4: port 5(vethf55cea1) entered blocking state

[ 1739.100689] br-cab7ed318ee4: port 5(vethf55cea1) entered forwarding state

[ 1739.276694] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

[ 1739.293434] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

[ 1739.308469] IPv6: ADDRCONF(NETDEV_CHANGE): vethb672c91: link becomes ready

[ 1739.320719] br-cab7ed318ee4: port 6(vethb672c91) entered blocking state

[ 1739.335555] br-cab7ed318ee4: port 6(vethb672c91) entered forwarding state

[ 1739.554321] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

[ 1739.575193] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

[ 1739.586918] IPv6: ADDRCONF(NETDEV_CHANGE): veth554e6f6: link becomes ready

[ 1739.595354] br-cab7ed318ee4: port 7(veth554e6f6) entered blocking state

[ 1739.612057] br-cab7ed318ee4: port 7(veth554e6f6) entered forwarding state

[ 1739.638354] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

[ 1739.654246] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

[ 1739.662214] IPv6: ADDRCONF(NETDEV_CHANGE): vethb484577: link becomes ready

[ 1739.678370] br-cab7ed318ee4: port 8(vethb484577) entered blocking state

[ 1739.689726] br-cab7ed318ee4: port 8(vethb484577) entered forwarding state

You can find here how Docker uses iptables and how you can disable it:

I am not sure I understand it. Do you mean you can’t use SSH into the VM until you stop the VM?

Depending on your network (IP address, gateway) the added rules can disable external connections. I think even without iptables. Make sure the IP address of the VM is not something like 172.17.0.1 . If it is the case, you can either change the network of the VM or change the IP addresses used by Docker.

Search for “default-address-pools”