Answer the question
In order to leave comments, you need to log in
How to get internet inside an OpenVZ container?
OS Debian GNU/Linux 7.6 (wheezy).
Unfortunately, I can't get internet inside the container when using veth.
If I use venet then everything works well.
Now a little about how the network is arranged.
vlan9 - ISP
vlan10 - network between router and L2+
switch vlan11 - network from PC.
There is an L2 + switch to which the Internet comes via vlan9.
Vlan 10 is the network up to the router that makes NAT vlan9 a normal masquerade -A POSTROUTING -o bond0.9 -j MASQUERADE .
The router has done interface aggregation (LACP) from the L2 + switch according to the 802.3ad standard.
vlan11 is a regular mesh, the L2+ switch handles routing for it.
Router config.
#bonding
auto bond0
iface bond0 inet manual
bond-mode 802.3ad
bond-miimon 100
bond-downdelay 200
bond-updelay 200
bond-lacp-rate 4
bond-slaves eth0 eth1
#vlan 9
auto bond0.9
iface bond0.9 inet dhcp
hwaddress ether 00:00:0C:97:BA:B8
vlan_raw_device bond0
#vlan 10
auto bond0.10
iface bond0.10 inet static
address 10.14.248.1
netmask 255.255.255.252
up route add -net 10.14.249.0/24 gw 10.14.248.2
down route del -net 10.14.249.0/24 gw 10.14.248.2
vlan_raw_device bond0
#vlan 11
auto bond0.11
iface bond0.11 inet manual
vlan_raw_device bond0
#bridge vlan11 for VM
auto vmbrd0v11
iface vmbrd0v11 inet manual
bridge_ports bond0.11
bridge_stp on
bridge_fd 0
bridge name bridge id STP enabled interfaces
vmbrd0v11 8000.0018518d937b yes bond0.11
veth1234.0
Answer the question
In order to leave comments, you need to log in
need to sysctl net.bridge.bridge-nf-call-iptables=0 .
After that, everything worked for me as it should.
they also recommend
sysctl net.bridge.bridge-nf-call-arptables=0
As a result, it turns out approximately that you need to change for openvz (this is suggested on the site)
net.ipv4.ip_forward = 1
net.ipv4.conf.default.forwarding=1
net. ipv4.conf.default.proxy_arp = 0
# Enables source route verification
net.ipv4.conf.all.rp_filter = 2
# Enables the magic-sysrq key
kernel.sysrq = 1
# TCP Explict Congestion Notification
#net.ipv4.tcp_ecn = 0
# we do not want all our interfaces to send redirects
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
And nice extra
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0
net.bridge.bridge-nf-call- ip6tables=0
net.bridge.bridge-nf-filter-vlan-tagged=0
If we are talking about PHP, then case-insensetive through modifiers
php.net/manual/en/reference.pcre.pattern.modifiers.php
specifically modifier "i"
when specifying a regular expression modifier is indicated at the end of the expression like this
/regular/modifiers
And the expression which would look for Mobil1 ** any text** 10w-60
/Mobil1.*?10w\-60/i
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question