5

On Debian 12.04 LTS

I am trying to access the key net.ipv4.conf.all.mc_forwarding by doing :

sudo sysctl -w net.ipv4.conf.all.mc_forwarding=1

But every time I am doing this, I get the message

error: permission denied on key 'net.ipv4.conf.all.mc_forwarding'

Why do I get this message? How can I change this key?

  • 1
    Because /proc/sys/net/ipv4/conf/all/mc_forwarding is read-only, even for root. It seems like you have to run a multicast router instead of turning this option on directly. – scai Jun 17 '13 at 12:24
6

I believe this thread describes your problem

In a nutshell, the proc entry containing that value is read-only, and cannot be made writable easily:

$ ls -ln /proc/sys/net/ipv4/conf/all/mc_forwarding 
-r--r--r-- 1 0 0 0 Jun 17 08:20 /proc/sys/net/ipv4/conf/all/mc_forwarding
$ sudo chmod u+x /proc/sys/net/ipv4/conf/all/mc_forwarding
chmod: changing permissions of `/proc/sys/net/ipv4/conf/all/mc_forwarding': Operation not permitted

But you can run your own router daemon to (e.g xorp) to get multicast forwarding.

| improve this answer | |
0

you can also get error like this sysctl: setting key "net.ipv4.conf.all.mc_forwarding": No such file or directory

mc_forwarding - BOOLEAN
    Do multicast routing. The kernel needs to be compiled with CONFIG_MROUTE
    and a multicast routing daemon is required.
    conf/all/mc_forwarding must also be set to TRUE to enable multicast
    routing for the interface

kernel should be compiled with option CONFIG_MROUTE, default kernel is not have this option set.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.