aboutsummaryrefslogtreecommitdiff
path: root/branches/0.6/templates/vserver/vserver.d/etc/rc.d/rc.ip_forward
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2009-03-06 02:03:53 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2009-03-06 02:03:53 +0000
commit52a3537b8ebca3a5146cf363ffa6d716f2b00da0 (patch)
treeba684cac72fd8e2147f13d7c27d5a61d6133a444 /branches/0.6/templates/vserver/vserver.d/etc/rc.d/rc.ip_forward
parentf93c3531707ac292b2d43f00c9a600d1ecdbb76d (diff)
downloadsimplepkg-52a3537b8ebca3a5146cf363ffa6d716f2b00da0.tar.gz
simplepkg-52a3537b8ebca3a5146cf363ffa6d716f2b00da0.tar.bz2
removing old 0.6 branch
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@798 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'branches/0.6/templates/vserver/vserver.d/etc/rc.d/rc.ip_forward')
-rw-r--r--branches/0.6/templates/vserver/vserver.d/etc/rc.d/rc.ip_forward64
1 files changed, 0 insertions, 64 deletions
diff --git a/branches/0.6/templates/vserver/vserver.d/etc/rc.d/rc.ip_forward b/branches/0.6/templates/vserver/vserver.d/etc/rc.d/rc.ip_forward
deleted file mode 100644
index 52bd2fe..0000000
--- a/branches/0.6/templates/vserver/vserver.d/etc/rc.d/rc.ip_forward
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/bin/sh
-# /etc/rc.d/rc.ip_forward: start/stop IP packet forwarding
-#
-# If you intend to run your Linux box as a router, i.e. as a
-# computer that forwards and redistributes network packets, you
-# will need to enable IP packet forwarding in your kernel.
-#
-# To activate IP packet forwarding at boot time, make this
-# script executable: chmod 755 /etc/rc.d/rc.ip_forward
-#
-# To disable IP packet forwarding at boot time, make this
-# script non-executable: chmod 644 /etc/rc.d/rc.ip_forward
-
-# Start IP packet forwarding:
-ip_forward_start() {
- if [ -f /proc/sys/net/ipv4/ip_forward ]; then
- echo "Activating IPv4 packet forwarding."
- echo 1 > /proc/sys/net/ipv4/ip_forward
- 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
- # network interface they're arriving on. This has security
- # advantages because it prevents the so-called IP spoofing,
- # however it can pose problems if you use asymmetric routing
- # (packets from you to a host take a different path than packets
- # from that host to you) or if you operate a non-routing host
- # which has several IP addresses on different interfaces. To
- # turn rp_filter off, uncomment the lines below:
- #if [ -r /proc/sys/net/ipv4/conf/all/rp_filter ]; then
- # echo "Disabling rp_filter."
- # echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
- #fi
-}
-
-# Stop IP packet forwarding:
-ip_forward_stop() {
- if [ -f /proc/sys/net/ipv4/ip_forward ]; then
- echo "Disabling IPv4 packet forwarding."
- echo 0 > /proc/sys/net/ipv4/ip_forward
- fi
-}
-
-# Restart IP packet forwarding:
-ip_forward_restart() {
- ip_forward_stop
- sleep 1
- ip_forward_start
-}
-
-case "$1" in
-'start')
- ip_forward_start
- ;;
-'stop')
- ip_forward_stop
- ;;
-'restart')
- ip_forward_restart
- ;;
-*)
- echo "usage $0 start|stop|restart"
-esac
-