Messages in this thread Patch in this message | | | Subject | Re: IP Masq Under 2.1.88+ | From | dlm@g7led ... | Date | Tue, 24 Mar 1998 00:19:30 +0000 (GMT) |
| |
Hi,
> Under 2.0.33 my Masq functions without error. However, from the subjet > you might guess, I am having problems under 2.1.88+ (I haven't tried > anything else). Under the tcp/ip section in make config, this is what is > compiled
> This is what I have under my script that is executed at boot time to > enable the IP Masq fwadmin rules > > #!/bin/sh > /sbin/depmod -a > /sbin/modprobe ip_masq_ftp > /sbin/modprobe ip_masq_raudio > /sbin/modprobe ip_masq_irc > ipfwadm -F -p deny > ipfwadm -F -a m -S 192.168.1.0/24 -D 0.0.0.0/0 > > Any suggestions?
Try:
echo "1" >/proc/sys/net/ipv4/ip_forwarding
or
echo "1" >/proc/sys/net/ipv4/ip_forward
depending upon the name of it on your system. I believe in 2.0.x it was, 'ip_forward', then in the middle of 2.1.x went to 'ip_forwarding' then recently has gone back to 'ip_forward'.
A diff for RedHat 5 users maybe useful upon this matter:
--- etc/rc.d/init.d/network.old Mon Mar 23 01:41:35 1998 +++ etc/rc.d/init.d/network Mon Mar 23 01:43:41 1998 @@ -31,6 +31,12 @@ # ignore aliases, alternative configurations, and editor backup files interfaces=`ls ifcfg* | egrep -v '(ifcfg-lo|:)' | egrep 'ifcfg-[a-z0-9]+$'` +if [ -f /proc/sys/net/ipv4/ip_forward ] ; then + IP_FWD="/proc/sys/net/ipv4/ip_forward"; +else + IP_FWD="/proc/sys/net/ipv4/ip_forwarding"; +fi + # See how we were called. case "$1" in start) @@ -40,8 +46,8 @@ if [ -d /proc/sys/net/ipv4 ]; then # people could have left this out of their kernel, which isn't # exactly an error - if [ ! -f /proc/sys/net/ipv4/ip_forwarding ] ; then - echo "/proc/sys/net/ipv4/ip_forwarding is missing --" \ + if [ ! -f ${IP_FWD} ] ; then + echo "${IP_FWD} is missing --" \ "cannot control IP forwarding" >&2 else if [ "$FORWARD_IPV4" = "no" -o "$FORWARD_IPV4" = "false" ]; then @@ -52,9 +58,9 @@ message="Enabling IPv4 packet forwarding." fi - if [ $value != `cat /proc/sys/net/ipv4/ip_forwarding` ]; then + if [ $value != `cat ${IP_FWD}` ]; then echo $message - echo "$value" > /proc/sys/net/ipv4/ip_forwarding + echo "$value" > ${IP_FWD} fi fi fi @@ -72,7 +78,7 @@ done ./ifdown ifcfg-lo echo "Disabling IPv4 packet forwarding." - echo 0 > /proc/sys/net/ipv4/ip_forwarding + echo 0 > ${IP_FWD} rm -f /var/lock/subsys/network ;; status)
-- Darryl Miles
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |