View previous topic :: View next topic |
Author |
Message |
truc Advocate
Joined: 25 Jul 2005 Posts: 3199
|
Posted: Fri Apr 30, 2010 9:13 am Post subject: sysctl -w net.ipv4.conf.all.send_redirects behaviour |
|
|
Hello,
sysctl -w net.ipv4.conf.all.send_redirects=0 doesn't set every net.ipv4.conf.${INTERFACE}.send_redirects to 0.
This would be, I think, the expected behaviour since sudo sysctl -w net.ipv4.conf.all.forwarding=1 does set every net.ipv4.conf.${INTERFACE}.forwarding
sudo sysctl -a| grep send_redirect: | error: permission denied on key 'net.ipv4.route.flush'
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0
net.ipv4.conf.lo.send_redirects = 1
net.ipv4.conf.eth0.send_redirects = 1
net.ipv4.conf.eth1.send_redirects = 0
error: permission denied on key 'net.ipv6.route.flush' |
sudo sysctl -w net.ipv4.conf.all.send_redirects=1: | net.ipv4.conf.all.send_redirects = 1 |
sudo sysctl -a| grep send_redirect: | error: permission denied on key 'net.ipv4.route.flush'
net.ipv4.conf.all.send_redirects = 1
net.ipv4.conf.default.send_redirects = 0
net.ipv4.conf.lo.send_redirects = 1
net.ipv4.conf.eth0.send_redirects = 1
net.ipv4.conf.eth1.send_redirects = 0
error: permission denied on key 'net.ipv6.route.flush' |
sudo sysctl -a| grep ipv4.*\\.forwarding: | error: permission denied on key 'net.ipv4.route.flush'
net.ipv4.conf.all.forwarding = 1
net.ipv4.conf.default.forwarding = 1
net.ipv4.conf.lo.forwarding = 1
net.ipv4.conf.eth0.forwarding = 1
net.ipv4.conf.eth1.forwarding = 1
error: permission denied on key 'net.ipv6.route.flush' |
sudo sysctl -w net.ipv4.conf.all.forwarding=0: | net.ipv4.conf.all.forwarding = 0 |
sudo sysctl -a| grep ipv4.*\\.forwarding: |
error: permission denied on key 'net.ipv4.route.flush'
net.ipv4.conf.all.forwarding = 0
net.ipv4.conf.default.forwarding = 0
net.ipv4.conf.lo.forwarding = 0
net.ipv4.conf.eth0.forwarding = 0
net.ipv4.conf.eth1.forwarding = 0
error: permission denied on key 'net.ipv6.route.flush'
|
So my question is.. Is this a bug or not? _________________ The End of the Internet! |
|
Back to top |
|
|
Mike81 n00b
Joined: 05 Jan 2011 Posts: 39
|
Posted: Wed Jan 09, 2013 11:55 pm Post subject: |
|
|
Hi,
I know the question is old, but did you find an answer? I see the same with "net.ipv4.conf.all.accept_redirects".
When you are googling for "accept_redirects" you will find many howtos/tutorials saying you should set
Code: | net.ipv4.conf.all.accept_redirects=0 |
in your /etc/sysctl.conf, but when you verify, even after a reboot,
Code: | # sysctl net.ipv4.conf.eth0.accept_redirects
net.ipv4.conf.eth0.accept_redirects = 1 |
So it seems like that nobody verify...
Setting it this via "net.ipv4.conf.default.accept_redirects" will do the trick. So when you reboot (or re-create eth0 without a reboot), everything will be as expected:
Code: | # sysctl net.ipv4.conf.eth0.accept_redirects
net.ipv4.conf.eth0.accept_redirects = 0 |
But it would be nice to know
- Why does all sometimes work and sometimes not?
- Is using default in sysctl.conf the recommended way? Seems to me...
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|