6

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?

terdon
  • 234,489
  • 66
  • 447
  • 667
Vladimir Leiv
  • 373
  • 1
  • 3
  • 10
  • 1
    Because */proc/sys/net/ipv4/conf/all/mc_forwarding* is read-only, even for *root*. [It seems like](http://www.network-builders.com/sysctl-permission-denied-mc_forwarding-keys-t109119.html) you have to run a multicast router instead of turning this option on directly. – scai Jun 17 '13 at 12:24

2 Answers2

6

I believe this thread (EDIT: link to bit-coin miner site removed) 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.

Kusalananda
  • 320,670
  • 36
  • 633
  • 936
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.

Igor
  • 101
  • 2