Chyba nigdy nie zrozumiem polityki tworzenia sieci w kontenerze lxc pod linuxem. Nigdy mi jeszcze nie zadzialala i chyba nigdy nie zadziala.
Na hoscie w interfaces mam taki wpis, ktory dziala.
Kod: Zaznacz cały
# The loopback network interface
auto lo
iface lo inet loopback
auto br0
iface br0 inet static
bridge_ports eth0
address 37.187.97.151
netmask 255.255.255.0
network 37.187.97.0
broadcast 37.187.97.255
gateway 37.187.97.254
dns-nameservers 213.186.33.99
dns-search ovh.net
Kod: Zaznacz cały
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.1.111
netmask 255.255.255.255
broadcast 192.168.1.111
post-up route add 37.187.97.254 dev eth0
post-up route add default gw 37.187.97.254
post-down route del 37.187.97.254 dev eth0
post-down route del default gw 37.187.97.254
Kod: Zaznacz cały
root@Proton:~# apt-get update
0% [Connecting to http.debian.net]
0% [Connecting to http.debian.net]
0% [Connecting to http.debian.net]
0% [Connecting to http.debian.net]
0% [Connecting to http.debian.net]
Kod: Zaznacz cały
root@Proton:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 37.187.97.254 0.0.0.0 UG 0 0 0 eth0
37.187.97.254 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
Z gory dziekuje,
Pozdrawiam,