There are plenty of thready regarding this topic, however I don't find the solution to the problem with my setup. I cannot access the internet form within a container nor a vm. I can trace the ping I issue form within the container/vm on my host machine which looks like this
My guest hast ip 10.10.10.73 received via dhcp. I have configured dnsmasq on the host as follows
Here is my network configuration in /etc/network/interfaces
I currently don't see what I am missing.
Code:
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on vmbr0, link-type EN10MB (Ethernet), capture size 262144 bytes
18:36:13.824830 IP 10.10.10.73.34570 > 8.8.8.8.53: 24507+ A? google.com. (28)
18:36:18.829967 IP 10.10.10.73.55784 > 8.8.4.4.53: 24507+ A? google.com. (28)
18:36:19.061335 ARP, Request who-has 10.10.10.2 tell 10.10.10.73, length 28
18:36:19.061383 ARP, Reply 10.10.10.2 is-at 4c:72:b9:25:28:95, length 28
18:36:23.835099 IP 10.10.10.73.34570 > 8.8.8.8.53: 24507+ A? google.com. (28)
18:36:28.840238 IP 10.10.10.73.55784 > 8.8.4.4.53: 24507+ A? google.com. (28)
18:36:33.845419 IP 10.10.10.73.58293 > 8.8.8.8.53: 1877+ A? google.com. (28)
18:36:38.850568 IP 10.10.10.73.34700 > 8.8.4.4.53: 1877+ A? google.com. (28)
18:36:43.855705 IP 10.10.10.73.58293 > 8.8.8.8.53: 1877+ A? google.com. (28)
My guest hast ip 10.10.10.73 received via dhcp. I have configured dnsmasq on the host as follows
Code:
interface=vmbr0
dhcp-range=10.10.10.10,10.10.10.150,12h
dhcp-option=6,8.8.8.8,8.8.4.4
Here is my network configuration in /etc/network/interfaces
Code:
# Loopback device:
auto lo
iface lo inet loopback
#
# device: eth0
auto eth0
iface eth0 inet static
address xx.xx.xx.177
netmask 255.255.255.224
gateway xx.xx.xx.161
# for a subnet
auto vmbr0
iface vmbr0 inet static
address 10.10.10.2
netmask 255.255.255.0
bridge_ports eth0
bridge_stp off
bridge_fd 0
up route add -net 10.10.10.0/24 gw xx.xx.xx.177
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '10.10.10.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o vmbr0 -j MASQUERADE
I currently don't see what I am missing.