Skip to contentSkip to conversation

Turning on IP Forwarding

DISCUSSION James Marcinek 6 participants 7 messages Mar 24, 2003

lore
Share & tools
lore
#0 lore raw

I always foget this.

Can anyone tell me which file I need to modify to turn on IP Forwarding? I know where to do it while the system is on; however, since it's a multi-homed system and my router, I would like to have it setup correctly...

Thanks,

James

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

#1 lore raw
Quoted 7 lines

I always foget this.

Can anyone tell me which file I need to modify to turn on IP Forwarding? I know where to do it while the system is on; however, since it's a multi-homed system and my router, I would like to have it setup correctly...

echo 1 > /proc/sys/net/ipv4/ip_forward

Place that line in eg. /etc/rc.local

//Jesper

#2 lore raw

Everybody is sending the same answer (that I was aware of). I was looking for the value that is set during bootup, not modifying that value. The value is contained in /etc/sysctl.conf (on RH linux) This is where the value is read from. The /proc file system is a virtual file system... The solution that I keep getting.

Thanks,

James

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

#3 lore raw
In reply to Jesper Lund

Or update /etc/sysctl.conf with the line:

net.ipv4.ip_forward = 1

-Scott

Quoted 7 lines · --- Jesper Lund
Quoted 3 lines

I always foget this.

Can anyone tell me which file I need to modify to

turn

Quoted 2 lines

on IP Forwarding? I know where to do it while the
system is on; however, since it's a multi-homed

system

Quoted 11 lines
Quoted 2 lines

and my router, I would like to have it setup
correctly...

echo 1 > /proc/sys/net/ipv4/ip_forward

Place that line in eg. /etc/rc.local

//Jesper

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

#4 lore raw
In reply to James Marcinek
Quoted 5 lines

Can anyone tell me which file I need to modify to turn on IP Forwarding? I know where to do it while the system is on; however, since it's a multi-homed system and my router, I would like to have it setup correctly...

Do you mean like, on a RedHat machine :
/etc/sysctl.conf ->
net.ipv4.ip_forward = 1

Or :
echo 1 > /proc/sys/net/ipv4/ip_forward
Which you can put in /etc/rc.d/rc.local or whatever startup file.

Rob

#5 lore raw
Quoted 8 lines · Rob Sterenborg

Do you mean like, on a RedHat machine :
/etc/sysctl.conf ->
net.ipv4.ip_forward = 1

Or :
echo 1 > /proc/sys/net/ipv4/ip_forward
Which you can put in /etc/rc.d/rc.local or whatever startup file.

Both will work, it is up to you to decide where you wish to have this placed!

I prefer having it as part of my firewall script to start and stop forwarding together with my firewall.

/Kim

#6 lore raw
In reply to James Marcinek

hi,
u have to do it in two places.
one /proc/sys/net/ipv4/ip_forward ..echo 1 to this file

the next is /etc/sysctl.conf..set net.ipv4.conf.default.ip_forward=1

hope this helps.

Regds,
sathvanth

Quoted 16 lines · James Marcinek

I always foget this.

Can anyone tell me which file I need to modify to turn on IP Forwarding? I know where to do it while the system is on; however, since it's a multi-homed system and my router, I would like to have it setup correctly...

Thanks,

James

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com