Weird issue : on Ubunut 22.04 , Outgoing connections only works if Host is connected via VPN

We are having a weird problem .
Host have LXD and Docker Installed.
if VPN is not connect all outgoing connections aren’t working. It only works if VPN is connected.
We are using OutlienVPN (shadowsocks) .

We had tried adding IPTABLES rules too and all the same problem.

default via 10.0.85.2 dev outline-tun0 metric 10
default via 192.168.100.1 dev wlp2s0 proto dhcp metric 600
10.0.3.0/24 dev lxcbr0 proto kernel scope link src 10.0.3.1 linkdown
10.0.85.0/24 dev outline-tun0 proto kernel scope link src 10.0.85.1
10.10.10.0/24 dev lxdbr3 proto kernel scope link src 10.10.10.1
10.93.41.0/24 dev lxdbr0 proto kernel scope link src 10.93.41.1 linkdown
131.153.77.202 via 192.168.100.1 dev wlp2s0 metric 5
169.254.0.0/16 dev outline-tun0 scope link metric 1000
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
172.18.0.0/16 dev br-9ceb47bf5612 proto kernel scope link src 172.18.0.1 linkdown
172.19.0.0/16 dev br-93c44288dbdd proto kernel scope link src 172.19.0.1 linkdown
172.20.0.0/16 dev br-dfe6c523bc78 proto kernel scope link src 172.20.0.1 linkdown
172.21.0.0/16 dev br-dff96c10d0a0 proto kernel scope link src 172.21.0.1 linkdown
172.22.0.0/16 dev br-53d499f80aa6 proto kernel scope link src 172.22.0.1
172.23.0.0/16 dev br-32f6d0163ec6 proto kernel scope link src 172.23.0.1 linkdown
172.24.0.0/16 dev br-6c8f8a8a0586 proto kernel scope link src 172.24.0.1 linkdown
172.25.0.0/16 dev br-3b39549b76b0 proto kernel scope link src 172.25.0.1 linkdown
192.168.100.0/24 dev wlp2s0 proto kernel scope link src 192.168.100.13 metric 600
iptables -I DOCKER-USER -i wlp2s0 -o lxdbr3 -j ACCEPT # <- find your wireless interface name for wlp3s0
iptables -I DOCKER-USER -o lxdbr3 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT

I had similar issue with LXD ubuntu:22.04 and Docker Daemon.

I found that issue: Containers do not have outgoing internet access

And use the same command to solve:

for ipt in iptables iptables-legacy ip6tables ip6tables-legacy; do $ipt --flush; $ipt --flush -t nat; $ipt --delete-chain; $ipt --delete-chain -t nat; $ipt -P FORWARD ACCEPT; $ipt -P INPUT ACCEPT; $ipt -P OUTPUT ACCEPT; done
systemctl reload snap.lxd.daemon
1 Like

I have changed distro to manajro and lxd is working all fine now. It seems firewallrule prolbmes as you faced.

1 Like