net.inet.icmp.drop_redirect do not set value1

In the file /etc/sysctl.conf I registered net.inet.icmp.drop_redirect = 1
But when I check in the terminal with the command:
Code:
# sysctl net.inet.icmp.drop_redirect
net.inet.icmp.drop_redirect: 0


Why 0?
 
What happens if you do the following command as root? (su or sudo)

sysctl -w net.inet.icmp.drop_redirect=1

If that works, then did you reboot after changing or do service sysctl restart?
 
Just modifying the /etc/sysctl.conf file doesn't change anything on the running system. You need to apply them too. You can do this with the sysctl(8) command or, if you modified sysctl.conf, service sysctl restart.
 
after the changes i made:

after the changes i made:
Code:
# /etc/rc.d/sysctl restart
Need a reboot too?

Need a reboot too?
 
In that case, no. Just make sure to restart /etc/rc.d/sysctl as that will apply the settings from /etc/sysctl.conf.
 
You saved the file after making the changes, yes?
The line you added looks like this:
net.inet.icmp.drop_redirect=1

No spaces around the "=" sign?
If you do the following as root, does it get set correctly?

service sysctl restart

If not, then there is a syntax error somewhere in the file.
 
its set to "auto" in defaults/rc.conf
if auto and no dynamic routing its set to 0
Code:
 _icmp_drop_redirect="${icmp_drop_redirect}"
        case "${_icmp_drop_redirect}" in
        [Aa][Uu][Tt][Oo] | "")
                if _check_dynamicrouting; then
                        _icmp_drop_redirect="yes"
                else
                        _icmp_drop_redirect="no"
                fi
                ;;
        esac
  if checkyesno _icmp_drop_redirect; then
                ropts_init inet
                echo -n ' ignore ICMP redirect=YES'
                ${SYSCTL} net.inet.icmp.drop_redirect=1 > /dev/null
        else
                ${SYSCTL} net.inet.icmp.drop_redirect=0 > /dev/null
        fi
 
Back
Top