Hi! Im trying to start a container that have access both to lan from all devices. And the internet. If i bridge i can only ping from the host. Internet works. But no other devices can ping the container.
In routed i can access from all devices on lan but the container cant access the internet.
Im on ubuntu 20.04.
Help…
tomp
(Thomas Parrott)
April 29, 2022, 3:20pm
2
Are you using LXD or LXC?
What is your container’s config?
Im using lxd. Installed with apt, not the snap.
config:
user.network-config: |
version: 2
ethernets:
eth0:
addresses:
- 192.168.1.200/32
nameservers:
addresses:
- 192.168.1.1 (also tried 8.8.8.8)
search: []
routes:
- to: 0.0.0.0/0
via: 169.254.0.1
on-link: true
description: Default LXD profile
devices:
eth0:
ipv4.address: 192.168.1.200
nictype: routed
parent: eno1np0
type: nic
name: routed
used_by:
Its the UFW. when i disable the ufw it works. what do i have to allow? i
Ufw
[ 1] 22/tcp ALLOW IN Anywhere
[ 2] Samba ALLOW IN Anywhere
[ 3] 3306/tcp ALLOW IN Anywhere
[ 4] Anywhere ALLOW IN 192.168.1.0/24
[ 5] 5900 ALLOW IN Anywhere
[ 6] Anywhere ALLOW IN 169.254.0.0
[ 7] Anywhere on veth96547961 ALLOW IN Anywhere
[ 8] Anywhere ALLOW FWD Anywhere on veth96547961
[ 9] Anywhere on enxb03af2b6059f ALLOW IN Anywhere
[10] Anywhere ALLOW FWD Anywhere on enxb03af2b6059f
[11] Anywhere (v6) on veth96547961 ALLOW IN Anywhere (v6)
[12] Anywhere (v6) ALLOW FWD Anywhere (v6) on veth96547961
[13] Anywhere (v6) on enxb03af2b6059f ALLOW IN Anywhere (v6)
[14] Anywhere (v6) ALLOW FWD Anywhere (v6) on enxb03af2b6059f
iptables -P FORWARD ACCEPT worked. Clean install of 20.04 so maybe a new default.