LINUX.ORG.RU

История изменений

Исправление Qwentor, (текущая версия) :

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
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 96:00:00:2e:60:47 brd ff:ff:ff:ff:ff:ff
    inet {ext_ipv4}/32 brd 116.203.99.131 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 {ext_ipv6}/64 scope global deprecated
       valid_lft forever preferred_lft 0sec
    inet6 fe80::9400:ff:fe2e:6047/64 scope link
       valid_lft forever preferred_lft forever
3: lxcbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:16:3e:00:00:00 brd ff:ff:ff:ff:ff:ff
    inet 10.0.3.1/24 scope global lxcbr0
       valid_lft forever preferred_lft forever
    inet6 fe80::216:3eff:fe00:0/64 scope link
       valid_lft forever preferred_lft forever
19: vethLG12KT@if18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master lxcbr0 state UP group default qlen 1000
    link/ether fe:4d:fa:89:82:c0 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet6 fe80::fc4d:faff:fe89:82c0/64 scope link
       valid_lft forever preferred_lft forever


brctl show

bridge name     bridge id               STP enabled     interfaces
lxcbr0          8000.00163e000000       no              vethLG12KT


iptables -vnL -t nat

Chain PREROUTING (policy ACCEPT 19 packets, 1120 bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 DNAT       tcp  --  eth0   *       0.0.0.0/0            0.0.0.0/0            tcp dpt:9500 to:10.0.3.74:5900

Chain INPUT (policy ACCEPT 3 packets, 160 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 365 packets, 21936 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain POSTROUTING (policy ACCEPT 365 packets, 21936 bytes)
 pkts bytes target     prot opt in     out     source               destination
13309  799K MASQUERADE  all  --  *      *       10.0.3.0/24         !10.0.3.0/24


cat /proc/sys/net/ipv4/ip_forward

1

Исходная версия Qwentor, :

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
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 96:00:00:2e:60:47 brd ff:ff:ff:ff:ff:ff
    inet {ext_ipv4}/32 brd 116.203.99.131 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 {ext_ipv6}/64 scope global deprecated
       valid_lft forever preferred_lft 0sec
    inet6 fe80::9400:ff:fe2e:6047/64 scope link
       valid_lft forever preferred_lft forever
3: lxcbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:16:3e:00:00:00 brd ff:ff:ff:ff:ff:ff
    inet 10.0.3.1/24 scope global lxcbr0
       valid_lft forever preferred_lft forever
    inet6 fe80::216:3eff:fe00:0/64 scope link
       valid_lft forever preferred_lft forever
19: vethLG12KT@if18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master lxcbr0 state UP group default qlen 1000
    link/ether fe:4d:fa:89:82:c0 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet6 fe80::fc4d:faff:fe89:82c0/64 scope link
       valid_lft forever preferred_lft forever


brctl show

bridge name     bridge id               STP enabled     interfaces
lxcbr0          8000.00163e000000       no              vethLG12KT


iptables -vnL -t nat

Chain PREROUTING (policy ACCEPT 265 packets, 15898 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain INPUT (policy ACCEPT 93 packets, 5578 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 1122 packets, 67937 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain POSTROUTING (policy ACCEPT 1122 packets, 67937 bytes)
 pkts bytes target     prot opt in     out     source               destination
13217  794K MASQUERADE  all  --  *      *       10.0.3.0/24         !10.0.3.0/24


cat /proc/sys/net/ipv4/ip_forward

1