Please note: I'm a complete beginner when it comes to networking. Im a frontend/backend dev, not a network engineer so all this is very confusing to myself
As the subject says, we have a container that has no internet, pinging anything results in 100% packet loss.
Approximately a month ago, all of our interfaces went down and had to do reinstate every single one of them back up which was done with some help of a senior (somebody who knows what they're doing) however, we forgot to test one of the containers to see if it had internet, we just checked to see if the website was back up and running.
I've now tried to deploy and failed on trying to pull the code from git which would be expected when your container has no internet.
I'm just trying to figure out how I can rectify this so the container has a internet connection.
I think we've configured like this, Node has internet via a bridge called vmbr1. Bridge is connected from the node to container.
(I can ping google.com from here)
Container has 2 connections, one is a lo and an eth0 connection from the looks
Here's the /etc/network/interfaces
I do a log (.bash_history) from the server of all the commands we ran to set up all the bridges and connections back up.
If any other information is required, please let me know
As the subject says, we have a container that has no internet, pinging anything results in 100% packet loss.
Approximately a month ago, all of our interfaces went down and had to do reinstate every single one of them back up which was done with some help of a senior (somebody who knows what they're doing) however, we forgot to test one of the containers to see if it had internet, we just checked to see if the website was back up and running.
I've now tried to deploy and failed on trying to pull the code from git which would be expected when your container has no internet.
I'm just trying to figure out how I can rectify this so the container has a internet connection.
I think we've configured like this, Node has internet via a bridge called vmbr1. Bridge is connected from the node to container.
Code:
ip a
...
7: vmbr1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether ac: xx:xx:xx:xx:8b brd ff:ff:ff:ff:ff:ff
inet 192.168.1.2/20 scope global vmbr1
valid_lft forever preferred_lft forever
inet6 xxxx::xxxx:xxxx:xxxx:xx8b/64 scope link
valid_lft forever preferred_lft forever
(I can ping google.com from here)
Container has 2 connections, one is a lo and an eth0 connection from the looks
Code:
ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
31: eth0@if32: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether xx:xx:xx:xx:xx:48 brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 192.168.0.189/24 brd 192.168.0.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 xxxx::xxxx:xxxx:xxxx:e048/64 scope link
valid_lft forever preferred_lft forever
Here's the /etc/network/interfaces
Code:
cat /etc/network/interfaces
auto lo
iface lo inet loopback
iface eno1 inet manual
iface eno2 inet manual
auto vmbr0
iface vmbr0 inet static
address SERVER IP
netmask 255.255.255.0
gateway SERVER GATEWAY
bridge-stp off
bridge-fd 0
auto vmbr1
iface vmbr1 inet static
address 192.168.1.2
netmask 255.255.240.0
bridge-stp off
bridge-fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '192.168.0.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.0.0/24' -o vmbr0 -j MASQUERADE
I do a log (.bash_history) from the server of all the commands we ran to set up all the bridges and connections back up.
If any other information is required, please let me know
Last edited: