summaryrefslogtreecommitdiffstats
path: root/source/n/network-scripts/scripts/rc.ip_forward
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2013-11-04 17:08:47 +0000
committer Eric Hameleers <alien@slackware.com>2018-05-31 22:57:36 +0200
commit76fc4757ac91ac7947a01fb7b53dddf9a78a01d1 (patch)
tree9b98e6e193c7870cb27ac861394c1c4592850922 /source/n/network-scripts/scripts/rc.ip_forward
parent9664bee729d487bcc0a0bc35859f8e13d5421c75 (diff)
downloadcurrent-76fc4757ac91ac7947a01fb7b53dddf9a78a01d1.tar.gz
current-76fc4757ac91ac7947a01fb7b53dddf9a78a01d1.tar.xz
Slackware 14.1slackware-14.1
Mon Nov 4 17:08:47 UTC 2013 Slackware 14.1 x86_64 stable is released! It's been another interesting release cycle here at Slackware bringing new features like support for UEFI machines, updated compilers and development tools, the switch from MySQL to MariaDB, and many more improvements throughout the system. Thanks to the team, the upstream developers, the dedicated Slackware community, and everyone else who pitched in to help make this release a reality. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. Have fun! :-)
Diffstat (limited to 'source/n/network-scripts/scripts/rc.ip_forward')
-rw-r--r--source/n/network-scripts/scripts/rc.ip_forward22
1 files changed, 22 insertions, 0 deletions
diff --git a/source/n/network-scripts/scripts/rc.ip_forward b/source/n/network-scripts/scripts/rc.ip_forward
index 8940dc2cc..1fa6b57cd 100644
--- a/source/n/network-scripts/scripts/rc.ip_forward
+++ b/source/n/network-scripts/scripts/rc.ip_forward
@@ -24,6 +24,17 @@ ip_forward_start() {
/bin/grep ipv4 /etc/sysctl.conf | sysctl -p - 1> /dev/null 2> /dev/null
fi
fi
+ if [ -f /proc/sys/net/ipv6/conf/all/forwarding ]; then
+ echo "Activating IPv6 packet forwarding."
+ echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
+ # Changing /proc/sys/net/ipv6/conf/all/forwarding results in resetting
+ # all non-default ipv6 parameters for the interface as mentioned in
+ # /usr/src/linux/Documentation/networking/ip-sysctl.txt. So, we
+ # will reapply any ipv6 sysctl parameters now:
+ if [ -r /etc/sysctl.conf ]; then
+ /bin/grep ipv6 /etc/sysctl.conf | sysctl -p - 1> /dev/null 2> /dev/null
+ fi
+ fi
# When using IPv4 packet forwarding, you will also get the
# rp_filter, which automatically rejects incoming packets if the
# routing table entry for their source address doesn't match the
@@ -53,6 +64,17 @@ ip_forward_stop() {
/bin/grep ipv4 /etc/sysctl.conf | sysctl -p - 1> /dev/null 2> /dev/null
fi
fi
+ if [ -f /proc/sys/net/ipv6/conf/all/forwarding ]; then
+ echo "Disabling IPv6 packet forwarding."
+ echo 0 > /proc/sys/net/ipv6/conf/all/forwarding
+ # Changing /proc/sys/net/ipv6/conf/all/forwarding results in resetting
+ # all non-default ipv6 parameters for the interface as mentioned in
+ # /usr/src/linux/Documentation/networking/ip-sysctl.txt. So, we
+ # will reapply any ipv6 sysctl parameters now:
+ if [ -r /etc/sysctl.conf ]; then
+ /bin/grep ipv6 /etc/sysctl.conf | sysctl -p - 1> /dev/null 2> /dev/null
+ fi
+ fi
}
# Restart IP packet forwarding: