Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [EN] [solved]Networkmanager sharing connection to other computers  (Read 24868 times)

conred

  • Guest
Hello,

I want to share a mobile broadband connection over ethernet with network-manager. If the option "Shared to other computers" is enabled in the IPv4 settings, network-manager fails to activate the connection.

network-manager:
  Installed: 0.9.4.0-5

nmcli shows:
Code: [Select]

root@sid:/# nmcli con up id "Wired connection 1"
WARNING: gnome-keyring:: couldn't connect to: /home/conred/.cache/keyring-8JKYVB/pkcs11: No such file or directory
Active connection state: unknown
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/15

** (process:27165): WARNING **: Could not create object for /org/freedesktop/NetworkManager/IP4Config/14: Method "GetAll" with signature "s" on interface "org.freedesktop.DBus.Properties" doesn't exist

Error: Timeout 90 sec expired.



edit:
It now shows some more info:
Code: [Select]
root@sid:/home/conred# nmcli con up id "Wired connection 1"
WARNING: gnome-keyring:: couldn't connect to: /home/conred/.cache/keyring-8JKYVB/pkcs11: No such file or directory

** (process:17333): WARNING **: Could not initialize NMActiveConnection /org/freedesktop/NetworkManager/ActiveConnection/1: Method "GetAll" with signature "s" on interface "org.freedesktop.DBus.Properties" doesn't exist

Active connection state: unknown
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/1

** (process:17333): WARNING **: Could not create object for /org/freedesktop/NetworkManager/ActiveConnection/1: Method "GetAll" with signature "s" on interface "org.freedesktop.DBus.Properties" doesn't exist


** (process:17333): WARNING **: Could not create object for /org/freedesktop/NetworkManager/IP4Config/1: Method "GetAll" with signature "s" on interface "org.freedesktop.DBus.Properties" doesn't exist

^C** Message: Caught signal 2, shutting down...
root@sid:/home/conred# nmcli con up id "Wired connection 1"
WARNING: gnome-keyring:: couldn't connect to: /home/conred/.cache/keyring-8JKYVB/pkcs11: No such file or directory

** (process:17687): WARNING **: Could not initialize NMActiveConnection /org/freedesktop/NetworkManager/ActiveConnection/2: Method "GetAll" with signature "s" on interface "org.freedesktop.DBus.Properties" doesn't exist

Active connection state: unknown
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/2

** (process:17687): WARNING **: Could not create object for /org/freedesktop/NetworkManager/ActiveConnection/2: Method "GetAll" with signature "s" on interface "org.freedesktop.DBus.Properties" doesn't exist


** (process:17687): WARNING **: Could not create object for /org/freedesktop/NetworkManager/IP4Config/2: Method "GetAll" with signature "s" on interface "org.freedesktop.DBus.Properties" doesn't exist

Error: Timeout 90 sec expired.



Edit by holgerw: Marked thread as solved

conred

  • Guest
RE: Networkmanager sharing connection to other computers
« Reply #1 on: 2012/09/01, 17:07:20 »
Just realized the version in wheezy is the same (0.9.4.0-5), which works for me with option "shared to ...". So I guess it's not directly related to network-manager.

under linux mint debian edition:
Code: [Select]
root@LMDE:/home/conred# nmcli con up id "Wired connection 1"
Active connection state: activated
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/3

conred

  • Guest
RE: Networkmanager sharing connection to other computers
« Reply #2 on: 2012/09/01, 17:29:40 »
Code: [Select]
grep -i networkmanager /var/log/syslog

shows

Code: [Select]
.
.
.
Sep  1 17:23:22 sid NetworkManager[2430]: <info> Activation (eth0) starting connection 'Wired connection 1'
Sep  1 17:23:22 sid NetworkManager[2430]: <info> (eth0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
Sep  1 17:23:22 sid NetworkManager[2430]: <info> Activation (eth0) Stage 1 of 5 (Device Prepare) scheduled...
Sep  1 17:23:22 sid NetworkManager[2430]: <info> Activation (eth0) Stage 1 of 5 (Device Prepare) started...
Sep  1 17:23:22 sid NetworkManager[2430]: <info> Activation (eth0) Stage 2 of 5 (Device Configure) scheduled...
Sep  1 17:23:22 sid NetworkManager[2430]: <info> Activation (eth0) Stage 1 of 5 (Device Prepare) complete.
Sep  1 17:23:22 sid NetworkManager[2430]: <info> Activation (eth0) Stage 2 of 5 (Device Configure) starting...
Sep  1 17:23:22 sid NetworkManager[2430]: <info> (eth0): device state change: prepare -> config (reason 'none') [40 50 0]
Sep  1 17:23:22 sid NetworkManager[2430]: <info> Activation (eth0) Stage 2 of 5 (Device Configure) successful.
Sep  1 17:23:22 sid NetworkManager[2430]: <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) scheduled.
Sep  1 17:23:22 sid NetworkManager[2430]: <info> Activation (eth0) Stage 2 of 5 (Device Configure) complete.
Sep  1 17:23:22 sid NetworkManager[2430]: <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) started...
Sep  1 17:23:22 sid NetworkManager[2430]: <info> (eth0): device state change: config -> ip-config (reason 'none') [50 70 0]
Sep  1 17:23:22 sid NetworkManager[2430]: <info> Activation (eth0) Stage 5 of 5 (IPv4 Configure Commit) scheduled...
Sep  1 17:23:22 sid NetworkManager[2430]: <info> Activation (eth0) Beginning IP6 addrconf.
Sep  1 17:23:22 sid NetworkManager[2430]: <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) complete.
Sep  1 17:23:22 sid NetworkManager[2430]: <info> Activation (eth0) Stage 5 of 5 (IPv4 Commit) started...
Sep  1 17:23:23 sid NetworkManager[2430]: <info> (eth0): writing resolv.conf to /sbin/resolvconf
Sep  1 17:23:23 sid NetworkManager[2430]: <info> Policy set 'blau.de Default 1' (ppp0) as default for IPv4 routing and DNS.
Sep  1 17:23:23 sid NetworkManager[2430]: <info> Executing: /sbin/iptables --table filter --insert INPUT --in-interface eth0 --protocol tcp --destination-port 53 --jump ACCEPT
Sep  1 17:23:23 sid NetworkManager[2430]: <info> Executing: /sbin/iptables --table filter --insert INPUT --in-interface eth0 --protocol udp --destination-port 53 --jump ACCEPT
Sep  1 17:23:23 sid NetworkManager[2430]: <info> Executing: /sbin/iptables --table filter --insert INPUT --in-interface eth0 --protocol tcp --destination-port 67 --jump ACCEPT
Sep  1 17:23:23 sid NetworkManager[2430]: <info> Executing: /sbin/iptables --table filter --insert INPUT --in-interface eth0 --protocol udp --destination-port 67 --jump ACCEPT
Sep  1 17:23:23 sid NetworkManager[2430]: <info> Executing: /sbin/iptables --table filter --insert FORWARD --in-interface eth0 --jump REJECT
Sep  1 17:23:23 sid NetworkManager[2430]: <info> Executing: /sbin/iptables --table filter --insert FORWARD --out-interface eth0 --jump REJECT
Sep  1 17:23:23 sid NetworkManager[2430]: <info> Executing: /sbin/iptables --table filter --insert FORWARD --in-interface eth0 --out-interface eth0 --jump ACCEPT
Sep  1 17:23:23 sid NetworkManager[2430]: <info> Executing: /sbin/iptables --table filter --insert FORWARD --source 10.42.0.0/255.255.255.0 --in-interface eth0 --jump ACCEPT
Sep  1 17:23:23 sid NetworkManager[2430]: <info> Executing: /sbin/iptables --table filter --insert FORWARD --destination 10.42.0.0/255.255.255.0 --out-interface eth0 --match state --state ESTABLISHED,RELATED --jump ACCEPT
Sep  1 17:23:23 sid NetworkManager[2430]: <info> Executing: /sbin/iptables --table nat --insert POSTROUTING --source 10.42.0.0/255.255.255.0 ! --destination 10.42.0.0/255.255.255.0 --jump MASQUERADE
Sep  1 17:23:23 sid NetworkManager[2430]: <error> [1346513003.160142] [nm-device.c:2638] start_sharing(): (eth0/eth0): failed to start dnsmasq: Could not find dnsmasq binary.
Sep  1 17:23:23 sid NetworkManager[2430]: <info> Executing: /sbin/iptables --table nat --delete POSTROUTING --source 10.42.0.0/255.255.255.0 ! --destination 10.42.0.0/255.255.255.0 --jump MASQUERADE
Sep  1 17:23:23 sid NetworkManager[2430]: <info> Executing: /sbin/iptables --table filter --delete FORWARD --destination 10.42.0.0/255.255.255.0 --out-interface eth0 --match state --state ESTABLISHED,RELATED --jump ACCEPT
Sep  1 17:23:23 sid NetworkManager[2430]: <info> Executing: /sbin/iptables --table filter --delete FORWARD --source 10.42.0.0/255.255.255.0 --in-interface eth0 --jump ACCEPT
Sep  1 17:23:23 sid NetworkManager[2430]: <info> Executing: /sbin/iptables --table filter --delete FORWARD --in-interface eth0 --out-interface eth0 --jump ACCEPT
Sep  1 17:23:23 sid NetworkManager[2430]: <info> Executing: /sbin/iptables --table filter --delete FORWARD --out-interface eth0 --jump REJECT
Sep  1 17:23:23 sid NetworkManager[2430]: <info> Executing: /sbin/iptables --table filter --delete FORWARD --in-interface eth0 --jump REJECT
Sep  1 17:23:23 sid NetworkManager[2430]: <info> Executing: /sbin/iptables --table filter --delete INPUT --in-interface eth0 --protocol udp --destination-port 67 --jump ACCEPT
Sep  1 17:23:23 sid NetworkManager[2430]: <info> Executing: /sbin/iptables --table filter --delete INPUT --in-interface eth0 --protocol tcp --destination-port 67 --jump ACCEPT
Sep  1 17:23:23 sid NetworkManager[2430]: <info> Executing: /sbin/iptables --table filter --delete INPUT --in-interface eth0 --protocol udp --destination-port 53 --jump ACCEPT
Sep  1 17:23:23 sid NetworkManager[2430]: <info> Executing: /sbin/iptables --table filter --delete INPUT --in-interface eth0 --protocol tcp --destination-port 53 --jump ACCEPT
Sep  1 17:23:23 sid NetworkManager[2430]: <warn> Activation (eth0) Stage 5 of 5 (IPv4 Commit) start sharing failed.
Sep  1 17:23:23 sid NetworkManager[2430]: <info> (eth0): device state change: ip-config -> failed (reason 'sharing-start-failed') [70 120 18]
Sep  1 17:23:23 sid NetworkManager[2430]: <warn> Activation (eth0) failed.
Sep  1 17:23:23 sid NetworkManager[2430]: <info> Activation (eth0) Stage 5 of 5 (IPv4 Commit) complete.
Sep  1 17:23:23 sid NetworkManager[2430]: <info> (eth0): device state change: failed -> disconnected (reason 'none') [120 30 0]
Sep  1 17:23:23 sid NetworkManager[2430]: <info> (eth0): deactivating device (reason 'none') [0]
Sep  1 17:23:23 sid NetworkManager[2430]: <info> (eth0): writing resolv.conf to /sbin/resolvconf
Sep  1 17:23:23 sid NetworkManager[2430]: <info> Policy set 'blau.de Default 1' (ppp0) as default for IPv4 routing and DNS.
Sep  1 17:23:23 sid NetworkManager[2430]: <info> Policy set 'blau.de Default 1' (ppp0) as default for IPv4 routing and DNS.

conred

  • Guest
RE: Networkmanager sharing connection to other computers
« Reply #3 on: 2012/09/01, 17:47:02 »
Found the solution, the package dnsmasq is missing.

Code: [Select]
Sep  1 17:23:23 sid NetworkManager[2430]: <error> [1346513003.160142] [nm-device.c:2638] start_sharing(): (eth0/eth0): failed to start dnsmasq: Could not find dnsmasq binary.

After installing it all works well.
Nevermind this monolog.  :D


Edit:

Wait, it only looked good from nmcli output.
Now I'm getting
Code: [Select]
<warn> dnsmasq exited with error: Network access problem (address in use; permissions; etc) (2)

Offline DeepDayze

  • User
  • Posts: 457
Re: RE: Networkmanager sharing connection to other computers
« Reply #4 on: 2012/09/01, 21:27:01 »
Quote from: "conred"
Found the solution, the package dnsmasq is missing.

Code: [Select]
Sep  1 17:23:23 sid NetworkManager[2430]: <error> [1346513003.160142] [nm-device.c:2638] start_sharing(): (eth0/eth0): failed to start dnsmasq: Could not find dnsmasq binary.

After installing it all works well.
Nevermind this monolog.  :D


Edit:

Wait, it only looked good from nmcli output.
Now I'm getting
Code: [Select]
<warn> dnsmasq exited with error: Network access problem (address in use; permissions; etc) (2)


Possibly dnsmasq needs further configuration to make it work in the way you desire. Anyone with experience in setting up dnsmasq should chime in and help

Offline michaa7

  • User
  • Posts: 2.300
Re: RE: Networkmanager sharing connection to other computers
« Reply #5 on: 2012/09/01, 22:15:37 »
Quote from: "conred"
...
Edit:

Wait, it only looked good from nmcli output.
Now I'm getting
Code: [Select]
<warn> dnsmasq exited with error: Network access problem (address in use; permissions; etc) (2)


I am no expert in the networking area, but I (and others) had similar problems when configuring NM while CENI was runing, specially this "address in use" seems to indicate a competing access from different resources. The solution in that case was to reinstall NM while CENI was disabled (Is it installed/active?).

So take this as a shot in the dark, maybe dnsmasq and NM don't work together out of the box: *Reinstall* this whole bunch of packages (NM, dnsmasq, ???) at one go and reconfigure it again.
Ok, you can't code, but you still might be able to write a bug report for Debian's sake

conred

  • Guest
RE: Re: RE: Networkmanager sharing connection to other compu
« Reply #6 on: 2012/09/05, 10:00:45 »
I got the sharing working by killing the dnsmasq process. But after that, there is no more internet acess in siduction.

After running
Code: [Select]
killall dnsmasq the activation of eth0 works without errors, also sharing of broadband works, but no more acess to broadband in siduction itself.

Further configuration of dnsmasq is the cue. There seems to be a problem with networkmanager handling dnsmasq.


Ceni was disabled and I removed it for testing purpose, but it does not change anything.
Speaking about ceni: Would it be possible to share a BB connection with wvdial and ceni?

Offline devil

  • Administrator
  • User
  • *****
  • Posts: 4.842
RE: Re: RE: Networkmanager sharing connection to other compu
« Reply #7 on: 2012/09/05, 11:07:58 »
Ceni is a very simple tool and does exactly what the name promises: configure /etc/network/interfaces. I do not think it can deal with wvdial.

greetz
devil

conred

  • Guest
RE: Re: RE: Networkmanager sharing connection to other compu
« Reply #8 on: 2012/09/05, 12:24:01 »
I see, thanks for explanation.

I finally got it working. :D


Edit:

First I thought it worked because of dns setting in NM config (see below), but that was wrong.
After a reboot I had the same error.

The workaround that does the trick is just to stop dnsmasq
Code: [Select]
/etc/init.d/dnsmasq stop and then all works like a charme. Activation of eth0 goes well and after connecting to broadband, routing works.

-------------


old posting:

When activating the wired connection (with "shared to .." option) Network-manager wants to restart (or start a second) dnsmasq instance.

These postings got me in the right direction:
http://sokratisg.wordpress.com/2012/03/31/ubuntu-precise-12-04-get-rid-of-nms-dnsmasq-and-setup-your-own/
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/959037

As a workaround I told NM to use bind by adding "dns=bind" to
Code: [Select]
/etc/NetworkManager/NetworkManager.conf.

That did the trick. Maybe there is a better solution but for now it works.

Offline DeepDayze

  • User
  • Posts: 457
RE: Re: RE: Networkmanager sharing connection to other compu
« Reply #9 on: 2012/09/05, 16:17:13 »
Good stuff, maybe this can be added to the NM wiki page for setting up a shared mobile broadband connection using NM

Offline michaa7

  • User
  • Posts: 2.300
Re: RE: Re: RE: Networkmanager sharing connection to other c
« Reply #10 on: 2012/09/05, 20:37:05 »
Quote from: "conred"
...
Edit:

First I thought it worked because of dns setting in NM config (see below), but that was wrong.
After a reboot I had the same error.

The workaround that does the trick is just to stop dnsmasq
Code: [Select]
/etc/init.d/dnsmasq stop and then all works like a charme. Activation of eth0 goes well and after connecting to broadband, routing works.
...


So does it still work if you purge dnsmasq, i.e. do we really need to install dnsmasq (as mentioned by you some postings above)?
Ok, you can't code, but you still might be able to write a bug report for Debian's sake

conred

  • Guest
RE: Re: RE: Re: RE: Networkmanager sharing connection to oth
« Reply #11 on: 2012/09/10, 22:10:32 »
Good idea, purged it right away and it just works as expected. Thanks :)
So the actual fix was to install and purge dnsmasq.??

I'm going to install siduction to another pc in a few days and will try to get more information about it. If anybody has some ideas or commands to throw on it, I'll try to find the reason behind.

conred

  • Guest
RE: Re: RE: Re: RE: Networkmanager sharing connection to oth
« Reply #12 on: 2012/09/14, 02:30:43 »
Solved the problem finaly after a desperado-kde installation one hour ago and a second try on it.

Package
Code: [Select]
dnsmasq-base must be installed instead of "dnsmasq" to get the NM sharing working without any errors.

Offline DeepDayze

  • User
  • Posts: 457
Re: RE: Re: RE: Re: RE: Networkmanager sharing connection to
« Reply #13 on: 2012/09/14, 02:47:23 »
Quote from: "conred"
Solved the problem finaly after a desperado-kde installation one hour ago and a second try on it.

Package
Code: [Select]
dnsmasq-base must be installed instead of "dnsmasq" to get the NM sharing working without any errors.


Great that you found the solution so perhaps this can be put up on the wiki too for others that want to set up a shared connection using NM

You should be able to fix your other install by purging dnsmasq and then installing dnsmasq-base