* RE: ip_forward file
@ 2002-07-04 22:12 George Vieira
2002-07-04 22:45 ` Jan Humme
0 siblings, 1 reply; 7+ messages in thread
From: George Vieira @ 2002-07-04 22:12 UTC (permalink / raw)
To: 'Antony Stone', iptables
Redhat uses it's /etc/sysconfig/network file to save that stuff..
IE..
FORWARD_IPV4=yes
thanks,
George Vieira
Systems Manager
Citadel Computer Systems P/L
http://www.citadelcomputer.com.au
-----Original Message-----
From: Antony Stone [mailto:Antony@Soft-Solutions.co.uk]
Sent: Thursday, 04 July 2002 11:17 PM
To: iptables
Subject: Re: ip_forward file
On Thursday 04 July 2002 2:16 pm, Denis JULIEN wrote:
> Hi,
> In order to validate the routing of my Red hat linux (7.2) I have to do an
> echo "1" > /proc/sys/net/ipv4/ip_forward.
> But every time that I restart the network service the ip_forward file
> returns to the "0" value and my server does not route any more.
> How can I do to keep the ip_forward set to "1"?
Put the command:
echo "1" > /proc/sys/net/ipv4/ip_forward
into one of your startup scripts (preferably after setting the firewall
rules).
Antony.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ip_forward file
2002-07-04 22:12 ip_forward file George Vieira
@ 2002-07-04 22:45 ` Jan Humme
0 siblings, 0 replies; 7+ messages in thread
From: Jan Humme @ 2002-07-04 22:45 UTC (permalink / raw)
To: George Vieira; +Cc: iptables
On Friday 05 July 2002 00:12, George Vieira wrote:
> Redhat uses it's /etc/sysconfig/network file to save that stuff..
>
> IE..
>
> FORWARD_IPV4=yes
Not on all RedHat versions work this way, e.g. NOT on RH 7.1 which I am
running today.
But I seem to remember it did in RH 6.1; what version are you running?
On RedHat 7.1 a "service network stop" (or /etc/init.d/network stop) will
disable forwarding, but "service network start" will NOT enable it again (!),
unless specified in /etc/sysctl.conf.
So if you do a "service network restart" (or /etc/rc.d/init.d/network
restart) and expect to have a clean network configuration (after messing
around or whatever), then your forwarding won't work.
This is the reason why I now use /etc/sysctl.conf instead of a line in
/etc/rc.local; then everything works fine.
Jan Humme.
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: ip_forward file
@ 2002-07-04 23:12 George Vieira
2002-07-05 9:15 ` R. Sterenborg
0 siblings, 1 reply; 7+ messages in thread
From: George Vieira @ 2002-07-04 23:12 UTC (permalink / raw)
To: 'jan.humme@xs4all.nl'; +Cc: iptables
I'm using 7.1 but I do admit I also have the "echo 1 > /proc/.." statement
in my firewall rules only because I've copied from other servers I
originally wrote this...
I also hate some redhat scripts and modified mine to check for added
requirements and removed some like (example of one):
#>vi /etc/init.d/network
if [ ! -f /etc/sysconfig/network ]; then
exit 0
fi
. /etc/sysconfig/network
.
.
.
if [ -d /proc/sys/net/ipv4 ]; then
# if [ -f /proc/sys/net/ipv4/ip_forward ]; then
# if [ `cat /proc/sys/net/ipv4/ip_forward` != 0 ]; then
# action $"Disabling IPv4 packet forwarding: " sysctl
-w net.ipv4.ip_forward=0
# fi
# fi
case "$FORWARD_IPV4" in
yes|true)
echo "1" > /proc/sys/net/ipv4/ip_forward
;;
*)
echo "0" > /proc/sys/net/ipv4/ip_forward
;;
esac
fi
This is something like the one I did for recent clients but from memory
(modded my local machine to show you all)...
thanks,
George Vieira
Systems Manager
Citadel Computer Systems P/L
http://www.citadelcomputer.com.au
-----Original Message-----
From: Jan Humme [mailto:jan.humme@xs4all.nl]
Sent: Friday, 05 July 2002 8:46 AM
To: George Vieira
Cc: iptables
Subject: Re: ip_forward file
On Friday 05 July 2002 00:12, George Vieira wrote:
> Redhat uses it's /etc/sysconfig/network file to save that stuff..
>
> IE..
>
> FORWARD_IPV4=yes
Not on all RedHat versions work this way, e.g. NOT on RH 7.1 which I am
running today.
But I seem to remember it did in RH 6.1; what version are you running?
On RedHat 7.1 a "service network stop" (or /etc/init.d/network stop) will
disable forwarding, but "service network start" will NOT enable it again
(!),
unless specified in /etc/sysctl.conf.
So if you do a "service network restart" (or /etc/rc.d/init.d/network
restart) and expect to have a clean network configuration (after messing
around or whatever), then your forwarding won't work.
This is the reason why I now use /etc/sysctl.conf instead of a line in
/etc/rc.local; then everything works fine.
Jan Humme.
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: ip_forward file
2002-07-04 23:12 George Vieira
@ 2002-07-05 9:15 ` R. Sterenborg
0 siblings, 0 replies; 7+ messages in thread
From: R. Sterenborg @ 2002-07-05 9:15 UTC (permalink / raw)
To: iptables
----- Original Message -----
From: "George Vieira" <GeorgeV@citadelcomputer.com.au>
> I'm using 7.1 but I do admit I also have the "echo 1 > /proc/.." statement
> in my firewall rules only because I've copied from other servers I
> originally wrote this...
Me too, but not because of inheritance.
When I start the firewall script, it handles echo 1 > ...
When I stop the firewall script, it handles echo 0 > ...
And I do that for multiple echo's to /proc/...
This way I have it all in one place instead of different places.
I think it's a matter of opinion where to put it.
Rob
^ permalink raw reply [flat|nested] 7+ messages in thread
* ip_forward file
@ 2002-07-04 13:16 Denis JULIEN
2002-07-04 13:16 ` Antony Stone
2002-07-04 14:17 ` Fabrice MARIE
0 siblings, 2 replies; 7+ messages in thread
From: Denis JULIEN @ 2002-07-04 13:16 UTC (permalink / raw)
To: iptables
Hi,
In order to validate the routing of my Red hat linux (7.2) I have to do an
echo "1" > /proc/sys/net/ipv4/ip_forward.
But every time that I restart the network service the ip_forward file
returns to the "0" value and my server does not route any more.
How can I do to keep the ip_forward set to "1"?
(It's my first time on linux..)
thank in advance
Denis
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ip_forward file
2002-07-04 13:16 Denis JULIEN
@ 2002-07-04 13:16 ` Antony Stone
2002-07-04 14:17 ` Fabrice MARIE
1 sibling, 0 replies; 7+ messages in thread
From: Antony Stone @ 2002-07-04 13:16 UTC (permalink / raw)
To: iptables
On Thursday 04 July 2002 2:16 pm, Denis JULIEN wrote:
> Hi,
> In order to validate the routing of my Red hat linux (7.2) I have to do an
> echo "1" > /proc/sys/net/ipv4/ip_forward.
> But every time that I restart the network service the ip_forward file
> returns to the "0" value and my server does not route any more.
> How can I do to keep the ip_forward set to "1"?
Put the command:
echo "1" > /proc/sys/net/ipv4/ip_forward
into one of your startup scripts (preferably after setting the firewall
rules).
Antony.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ip_forward file
2002-07-04 13:16 Denis JULIEN
2002-07-04 13:16 ` Antony Stone
@ 2002-07-04 14:17 ` Fabrice MARIE
1 sibling, 0 replies; 7+ messages in thread
From: Fabrice MARIE @ 2002-07-04 14:17 UTC (permalink / raw)
To: Denis JULIEN, iptables
Hello,
On Thursday 04 July 2002 21:16, Denis JULIEN wrote:
> Hi,
> In order to validate the routing of my Red hat linux (7.2) I have to do an
> echo "1" > /proc/sys/net/ipv4/ip_forward.
> But every time that I restart the network service the ip_forward file
> returns to the "0" value and my server does not route any more.
> How can I do to keep the ip_forward set to "1"?
> (It's my first time on linux..)
> thank in advance
> Denis
If you have a file called /etc/sysctl.conf,
then add the following line in it :
net.ipv4.ip_forward = 1
Have a nice day,
Fabrice.
--
Fabrice MARIE
Senior R&D Engineer
Celestix Networks
http://www.celestix.com/
"Silly hacker, root is for administrators"
-Unknown
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2002-07-05 9:15 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-04 22:12 ip_forward file George Vieira
2002-07-04 22:45 ` Jan Humme
-- strict thread matches above, loose matches on Subject: below --
2002-07-04 23:12 George Vieira
2002-07-05 9:15 ` R. Sterenborg
2002-07-04 13:16 Denis JULIEN
2002-07-04 13:16 ` Antony Stone
2002-07-04 14:17 ` Fabrice MARIE
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.