OpenVZ Forum


Home » General » Discussions » i can't ping vps from the host. (i can't ping vps from the host.)
Re: i can't ping vps from the host. [message #41151 is a reply to message #40340] Fri, 03 December 2010 05:56 Go to previous message
lars.bailey is currently offline  lars.bailey
Messages: 38
Registered: April 2010
Member
The kernel key I demonstraated to enable will not work with
with SYSCTL.
This will enable forwarding for all VETH interfaces;

net.ipv4.conf.default.forwarding = 1

This is taken directly from one Node server.

net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.default.proxy_arp = 0
net.ipv4.conf.vebr0.proxy_arp = 1
net.ipv4.conf.vebr0.forwarding = 0
net.ipv4.conf.default.forwarding = 1
net.ipv4.conf.eth1.forwarding = 1
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.all.accept_redirects = 0

The kernel keys for the physical interfaces,is based on my particular setup.
Just proper your firewall rules,if you want to limit forwarding
for a VETH configured container.(self-exxplainatory)

# This is my full "sysctl.conf"

kernel.sysrq = 1
kernel.core_uses_pid = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 4294967295
kernel.shmall = 268435456

# Prevent SYN attacks

net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_max_syn_backlog = 2048
net.ipv4.tcp_synack_retries = 2

# OpenVZ

net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.default.proxy_arp = 0
net.ipv4.conf.vebr0.proxy_arp = 1
net.ipv4.conf.vebr0.forwarding = 0
net.ipv4.conf.default.forwarding = 1
net.ipv4.conf.eth1.forwarding = 1
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.all.accept_redirects = 0

#IPv6

net.ipv6.conf.all.forwarding = 1
net.ipv6.conf.all.accept_redirects = 0

# Depreciated,but needed for setup tool
# net.ipv4.ip_forward = 1

# My tweaks

net.core.rmem_default = 524288
net.core.rmem_max = 524288
net.core.wmem_default = 524288
net.core.wmem_max = 524288
net.ipv4.tcp_wmem = 4096 87380 524288
net.ipv4.tcp_rmem = 4096 87380 524288
net.ipv4.tcp_mem = 524288 524288 524288
net.ipv4.tcp_rfc1337 = 1
net.ipv4.ip_no_pmtu_disc = 0
net.ipv4.tcp_sack = 1
net.ipv4.tcp_fack = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 0
net.ipv4.tcp_ecn = 0
net.ipv4.conf.all.log_martians = 1

vm.vfs_cache_pressure = 50
vm.swappiness = 20

Hope it helps
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: control panel question
Next Topic: vps goes offline
Goto Forum:
  


Current Time: Thu Sep 04 17:21:26 GMT 2025

Total time taken to generate the page: 0.10766 seconds