История изменений
Исправление Qwentor, (текущая версия) :
NAT почти заработал. Доступ из контейнера к хосту имею и наоборот, а вот из контейнера в интернет нет.
Настройки контейнера:
# Template used to create this container: /usr/share/lxc/templates/lxc-download
# Parameters passed to the template:
# For additional config options, please look at lxc.container.conf(5)
# Distribution configuration
lxc.include = /usr/share/lxc/config/ubuntu.common.conf
lxc.arch = x86_64
# Container specific configuration
lxc.rootfs = /var/lib/lxc/node/rootfs
lxc.utsname = node
# Network configuration
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.network.name = eth0
lxc.network.veth.pair = veth-01
lxc.network.ipv4 = 192.168.0.5/24
lxc.network.hwaddr = 00:1E:2D:F7:E3:4E
lxc.network.ipv4.gateway = 192.168.0.1
/etc/network/interfaces сервера
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 80.87.192.*
netmask 255.255.254.0
network 80.87.192.0
broadcast 80.87.193.255
gateway 80.87.192.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 188.120.247.2
dns-search deb
auto eth0:1
allow-hotplug eth0:1
iface eth0:1 inet static
address 83.220.168.*
auto eth0:2
allow-hotplug eth0:2
iface eth0:2 inet static
address 83.220.168.*
auto eth0:3
allow-hotplug eth0:3
iface eth0:3 inet static
address 77.246.159.*
auto br0
iface br0 inet static
bridge_ports none
bridge_fd 0
address 192.168.0.1
netmask 255.255.255.0
Далее сделал
iptables -t nat -A POSTROUTING -s 192.168.0.5/24 -j SNAT --to-source 80.87.192.*
Делал по этому мануалу
Исправление Qwentor, :
NAT почти заработал. Доступ из контейнера к хосту имею и наоборот, а вот из контейнера в интернет нет.
Настройки контейнера:
# Template used to create this container: /usr/share/lxc/templates/lxc-download
# Parameters passed to the template:
# For additional config options, please look at lxc.container.conf(5)
# Distribution configuration
lxc.include = /usr/share/lxc/config/ubuntu.common.conf
lxc.arch = x86_64
# Container specific configuration
lxc.rootfs = /var/lib/lxc/node/rootfs
lxc.utsname = node
# Network configuration
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.network.name = eth0
lxc.network.veth.pair = veth-01
lxc.network.ipv4 = 192.168.0.5/24
lxc.network.hwaddr = 00:1E:2D:F7:E3:4E
lxc.network.ipv4.gateway = 192.168.0.1
/etc/network/interfaces сервера
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 80.87.192.*
netmask 255.255.254.0
network 80.87.192.0
broadcast 80.87.193.255
gateway 80.87.192.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 188.120.247.2
dns-search deb
auto eth0:1
allow-hotplug eth0:1
iface eth0:1 inet static
address 83.220.168.*
auto eth0:2
allow-hotplug eth0:2
iface eth0:2 inet static
address 83.220.168.*
auto eth0:3
allow-hotplug eth0:3
iface eth0:3 inet static
address 77.246.159.*
auto br0
iface br0 inet static
bridge_ports none
bridge_fd 0
address 192.168.0.1
netmask 255.255.255.0
Далее сделал
iptables -t nat -A POSTROUTING -s 192.168.0.5/24 -j SNAT --to-source 80.87.192.147
Делал по этому мануалу
Исправление Qwentor, :
NAT почти заработал. Доступ из контейнера к хосту имею и наоборот, а вот из контейнера в интернет нет.
Настройки контейнера:
# Template used to create this container: /usr/share/lxc/templates/lxc-download
# Parameters passed to the template:
# For additional config options, please look at lxc.container.conf(5)
# Distribution configuration
lxc.include = /usr/share/lxc/config/ubuntu.common.conf
lxc.arch = x86_64
# Container specific configuration
lxc.rootfs = /var/lib/lxc/node/rootfs
lxc.utsname = node
# Network configuration
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.network.name = eth0
lxc.network.veth.pair = veth-01
lxc.network.ipv4 = 192.168.0.5/24
lxc.network.hwaddr = 00:1E:2D:F7:E3:4E
lxc.network.ipv4.gateway = 192.168.0.1
/etc/network/interfaces сервера
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 80.87.192.*
netmask 255.255.254.0
network 80.87.192.0
broadcast 80.87.193.255
gateway 80.87.192.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 188.120.247.2
dns-search deb
auto eth0:1
allow-hotplug eth0:1
iface eth0:1 inet static
address 83.220.168.*
auto eth0:2
allow-hotplug eth0:2
iface eth0:2 inet static
address 83.220.168.*
auto eth0:3
allow-hotplug eth0:3
iface eth0:3 inet static
address 77.246.159.*
auto br0
iface br0 inet static
bridge_ports none
bridge_fd 0
address 192.168.0.1
netmask 255.255.255.0
Далее сделал
iptables -t nat -A POSTROUTING -s 192.168.0.5/24 -j SNAT --to-source 80.87.192.147
Исправление Qwentor, :
NAT почти заработал. Доступ из контейнера к хосту имею и наоборот, а вот из контейнера в интернет нет.
Настройки контейнера:
# Template used to create this container: /usr/share/lxc/templates/lxc-download
# Parameters passed to the template:
# For additional config options, please look at lxc.container.conf(5)
# Distribution configuration
lxc.include = /usr/share/lxc/config/ubuntu.common.conf
lxc.arch = x86_64
# Container specific configuration
lxc.rootfs = /var/lib/lxc/node/rootfs
lxc.utsname = node
# Network configuration
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.network.name = eth0
lxc.network.veth.pair = veth-01
lxc.network.ipv4 = 192.168.0.5/24
lxc.network.hwaddr = 00:1E:2D:F7:E3:4E
lxc.network.ipv4.gateway = 192.168.0.1
/etc/network/interfaces сервера
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 80.87.192.*
netmask 255.255.254.0
network 80.87.192.0
broadcast 80.87.193.255
gateway 80.87.192.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 188.120.247.2
dns-search deb
auto eth0:1
allow-hotplug eth0:1
iface eth0:1 inet static
address 83.220.168.*
auto eth0:2
allow-hotplug eth0:2
iface eth0:2 inet static
address 83.220.168.*
auto eth0:3
allow-hotplug eth0:3
iface eth0:3 inet static
address 77.246.159.*
auto br0
iface br0 inet static
bridge_ports none
bridge_fd 0
address 192.168.0.1
netmask 255.255.255.0
Исходная версия Qwentor, :
NAT
почти
Настройки контейнера:
# Template used to create this container: /usr/share/lxc/templates/lxc-download
# Parameters passed to the template:
# For additional config options, please look at lxc.container.conf(5)
# Distribution configuration
lxc.include = /usr/share/lxc/config/ubuntu.common.conf
lxc.arch = x86_64
# Container specific configuration
lxc.rootfs = /var/lib/lxc/node/rootfs
lxc.utsname = node
# Network configuration
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.network.name = eth0
lxc.network.veth.pair = veth-01
lxc.network.ipv4 = 192.168.0.5/24
lxc.network.hwaddr = 00:1E:2D:F7:E3:4E
lxc.network.ipv4.gateway = 192.168.0.1
/etc/network/interfaces сервера
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 80.87.192.*
netmask 255.255.254.0
network 80.87.192.0
broadcast 80.87.193.255
gateway 80.87.192.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 188.120.247.2
dns-search deb
auto eth0:1
allow-hotplug eth0:1
iface eth0:1 inet static
address 83.220.168.*
auto eth0:2
allow-hotplug eth0:2
iface eth0:2 inet static
address 83.220.168.*
auto eth0:3
allow-hotplug eth0:3
iface eth0:3 inet static
address 77.246.159.*
auto br0
iface br0 inet static
bridge_ports none
bridge_fd 0
address 192.168.0.1
netmask 255.255.255.0