Clean up sysctl settings
This commit is contained in:
parent
427e50a9ed
commit
7674810559
11
vpnsetup.sh
11
vpnsetup.sh
@ -354,27 +354,16 @@ bigecho "Updating sysctl settings..."
|
||||
|
||||
if ! grep -qs "hwdsl2 VPN script" /etc/sysctl.conf; then
|
||||
conf_bk "/etc/sysctl.conf"
|
||||
if [ "$(getconf LONG_BIT)" = "64" ]; then
|
||||
SHM_MAX=68719476736
|
||||
SHM_ALL=4294967296
|
||||
else
|
||||
SHM_MAX=4294967295
|
||||
SHM_ALL=268435456
|
||||
fi
|
||||
cat >> /etc/sysctl.conf <<EOF
|
||||
|
||||
# Added by hwdsl2 VPN script
|
||||
kernel.msgmnb = 65536
|
||||
kernel.msgmax = 65536
|
||||
kernel.shmmax = $SHM_MAX
|
||||
kernel.shmall = $SHM_ALL
|
||||
|
||||
net.ipv4.ip_forward = 1
|
||||
net.ipv4.conf.all.accept_source_route = 0
|
||||
net.ipv4.conf.all.accept_redirects = 0
|
||||
net.ipv4.conf.all.send_redirects = 0
|
||||
net.ipv4.conf.all.rp_filter = 0
|
||||
net.ipv4.conf.default.accept_source_route = 0
|
||||
net.ipv4.conf.default.accept_redirects = 0
|
||||
net.ipv4.conf.default.send_redirects = 0
|
||||
net.ipv4.conf.default.rp_filter = 0
|
||||
|
@ -348,27 +348,16 @@ bigecho "Updating sysctl settings..."
|
||||
|
||||
if ! grep -qs "hwdsl2 VPN script" /etc/sysctl.conf; then
|
||||
conf_bk "/etc/sysctl.conf"
|
||||
if [ "$(getconf LONG_BIT)" = "64" ]; then
|
||||
SHM_MAX=68719476736
|
||||
SHM_ALL=4294967296
|
||||
else
|
||||
SHM_MAX=4294967295
|
||||
SHM_ALL=268435456
|
||||
fi
|
||||
cat >> /etc/sysctl.conf <<EOF
|
||||
|
||||
# Added by hwdsl2 VPN script
|
||||
kernel.msgmnb = 65536
|
||||
kernel.msgmax = 65536
|
||||
kernel.shmmax = $SHM_MAX
|
||||
kernel.shmall = $SHM_ALL
|
||||
|
||||
net.ipv4.ip_forward = 1
|
||||
net.ipv4.conf.all.accept_source_route = 0
|
||||
net.ipv4.conf.all.accept_redirects = 0
|
||||
net.ipv4.conf.all.send_redirects = 0
|
||||
net.ipv4.conf.all.rp_filter = 0
|
||||
net.ipv4.conf.default.accept_source_route = 0
|
||||
net.ipv4.conf.default.accept_redirects = 0
|
||||
net.ipv4.conf.default.send_redirects = 0
|
||||
net.ipv4.conf.default.rp_filter = 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user