[intrepid] network-manager should recommend or suggest dnsmasq

Bug #269963 reported by Cyril Jaquier
28
This bug affects 3 people
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
Fix Released
Medium
Unassigned
Nominated for Intrepid by Cyril Jaquier
Nominated for Jaunty by Per Ångström

Bug Description

Network-manager 0.7 supports connection sharing [1] but it requires dnsmasq which is neither recommended nor suggested for network-manager. After installing dnsmasq manually, I'm able to share a wired internet connection to an adhoc wireless network (which is pretty cool as I will probably be able to share my UMTS connection too).

So I think dnsmasq should be recommended or at least suggested by network-manager.

[1] https://fedoraproject.org/wiki/Features/ConnectionSharing

FriedChicken (domlyons)
Changed in network-manager:
status: New → Confirmed
Revision history for this message
Jack Wasey (jackwasey) wrote :

dnsmasq-base only, as dnsmasq runs a daemon which prevents network manager's command line invocation of the binary. documentation for nm is so appalling.

Revision history for this message
Paolo Melchiorre (paulox) wrote :

Fedore connection sharing how-to [1] not work form me.

I've installed dnsmasq-base and created new wireless connection.

Can you explain step-by-step process to share connection using network-manager and dnsmasq?

[1] http://www.redhatmagazine.com/2008/10/16/video-fedora-10-connection-sharing/

Revision history for this message
Paolo Melchiorre (paulox) wrote :
Download full text (10.8 KiB)

I'm sorry, aftwer restarting it works, but the winxp lapton continue to connect and disconnect.

This's the log:

I change many lines like this
Nov 8 17:04:30 intrepid NetworkManager: <info> (eth1): supplicant connection state change: 7 -> 4
Nov 8 17:04:30 intrepid NetworkManager: <info> (eth1): supplicant connection state change: 4 -> 7
with "..."

Nov 8 17:04:05 intrepid NetworkManager: <info> (eth1): device state change: 5 -> 7
Nov 8 17:04:05 intrepid NetworkManager: <info> Activation (eth1) Stage 4 of 5 (IP Configure Get) scheduled...
Nov 8 17:04:05 intrepid NetworkManager: <info> Activation (eth1) Stage 3 of 5 (IP Configure Start) complete.
Nov 8 17:04:05 intrepid NetworkManager: <info> Activation (eth1) Stage 4 of 5 (IP Configure Get) started...
Nov 8 17:04:05 intrepid NetworkManager: <info> Activation (eth1) Stage 5 of 5 (IP Configure Commit) scheduled...
Nov 8 17:04:05 intrepid NetworkManager: <info> Activation (eth1) Stage 4 of 5 (IP Configure Get) complete.
Nov 8 17:04:05 intrepid NetworkManager: <info> Activation (eth1) Stage 5 of 5 (IP Configure Commit) started...
Nov 8 17:04:05 intrepid avahi-daemon[5487]: Joining mDNS multicast group on interface eth1.IPv4 with address 10.42.45.1.
Nov 8 17:04:05 intrepid avahi-daemon[5487]: New relevant interface eth1.IPv4 for mDNS.
Nov 8 17:04:05 intrepid avahi-daemon[5487]: Registering new address record for 10.42.45.1 on eth1.IPv4.
Nov 8 17:04:06 intrepid NetworkManager: <info> Policy set 'Auto eth0' (eth0) as default for routing and DNS.
Nov 8 17:04:07 intrepid NetworkManager: <info> Executing: /sbin/iptables --table filter --insert INPUT --in-interface eth1 --protocol tcp --destination-port 53 --jump ACCEPT
Nov 8 17:04:07 intrepid NetworkManager: <info> Executing: /sbin/iptables --table filter --insert INPUT --in-interface eth1 --protocol udp --destination-port 53 --jump ACCEPT
Nov 8 17:04:07 intrepid NetworkManager: <info> Executing: /sbin/iptables --table filter --insert INPUT --in-interface eth1 --protocol tcp --destination-port 67 --jump ACCEPT
Nov 8 17:04:07 intrepid NetworkManager: <info> Executing: /sbin/iptables --table filter --insert INPUT --in-interface eth1 --protocol udp --destination-port 67 --jump ACCEPT
Nov 8 17:04:07 intrepid NetworkManager: <info> Executing: /sbin/iptables --table filter --insert FORWARD --in-interface eth1 --jump REJECT
Nov 8 17:04:07 intrepid NetworkManager: <info> Executing: /sbin/iptables --table filter --insert FORWARD --out-interface eth1 --jump REJECT
Nov 8 17:04:07 intrepid NetworkManager: <info> Executing: /sbin/iptables --table filter --insert FORWARD --in-interface eth1 --out-interface eth1 --jump ACCEPT
Nov 8 17:04:07 intrepid NetworkManager: <info> Executing: /sbin/iptables --table filter --insert FORWARD --source 10.42.45.0/255.255.255.0 --in-interface eth1 --jump ACCEPT
Nov 8 17:04:07 intrepid NetworkManager: <info> Executing: /sbin/iptables --table filter --insert FORWARD --destination 10.42.45.0/255.255.255.0 --out-interface eth1 --match state --state ESTABLISHED,RELATED --jump ACCEPT
Nov 8 17:04:07 intrepid NetworkManager: <info> Executing: /sbin/iptables --table nat --insert P...

Revision history for this message
Mario Limonciello (superm1) wrote :

I can confirm connection sharing works correctly after installing dnsmasq-base. I agree that it should be a recommends.

Revision history for this message
Alexander Sack (asac) wrote :

I don't understand why dnsmasq-base would help for connection sharing? Is this a DNS issue?

Revision history for this message
Alexander Sack (asac) wrote :

ok I think i understand. Is just -base really enough?

Changed in network-manager:
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
Mario Limonciello (superm1) wrote :

Yeah it appears -base is all that is needed.

Revision history for this message
Pietro Battiston (toobaz) wrote :

Can confirm it suffices. I tried to provide a debdiff but missed up with versioning. The fact there is a "Fix available" implies that we can hope to see it backported to Intrepid?

Revision history for this message
shockawe5 (shockawe5) wrote :

Why isn't this installed by default? It's less than 1 mg. What about when you try to create a wireless network, network-manager goes "Hey, you need dnsmasq-base in order to do this. Do you want to install it now?" I agree, it is very silly that this information isn't made more obvious to the end user. And all this time I thought the wireless card in my laptop was crap!

Revision history for this message
Daniel Holm (danielholm) wrote :

I agree. I've been trying to share a connection for some time now, if I would have found this page earlier, it would have saved a lot of time! ;)

Revision history for this message
Bron Gondwana (brong) wrote :

Plus nm-applet really shouldn't segfault because it can't find the binary. I was away from network connectivity (as you usually are when you try to ad-hoc, otherwise you'd just both connect to the infrastructure) when I tried this a couple of days ago.

Thankfully we are both experienced sysadmins who were happy to go nuke the network-manager processes and iwconfig/ifconfig ourselves. Left a pretty sour taste seeing nm-applet crash and disappear.

Dec 28 19:06:15 launde NetworkManager: <WARN> start_sharing(): (wlan0): failed to start dnsmasq: Could not find dnsmasq binary.

I ran nm-applet from the command line and it actually segfaulted when it couldn't find dnsmasq. It definitely needs to fail gracefully.

Revision history for this message
Per Ångström (autark) wrote :

This is needed for jaunty as well.

Revision history for this message
Richard Fairthorne (richard-fairthorne) wrote :

Just wanted to point out that this isn't just about sharing connections, but in fact affects *all* ad-hoc networks. I think dnsmasq-base should be a *requirement*, not just suggested, because Network Manager presents in its menus features that just don't work without it. If it's broken without it, it should be considered a requirement. my 2c.

Revision history for this message
Jack Wasey (jackwasey) wrote :

has anyone had trouble with running dnsmasq service, AND letting network manager try to run individual dnsmasq processes? this affected me in intrepid.

this might change the dependency requirement, and/or be another bug.

Revision history for this message
Jack Wasey (jackwasey) wrote :

dnsmasq provides dbus methods

network manager ignores whether dnsmasq service is running, and tries to instantiate new listeners on the interfaces it has brought up.

network manager therefore CONFLICTS with "dnsmasq" and this should be marked, so people don't install dnsmasq (which should be Depends) and dnsmasq (which would ruin everything).

Revision history for this message
Jack Wasey (jackwasey) wrote :

to run dnsmasq as invoked automatically by network manager (since it doesn't use the dbus methods in the ubuntu build), you have to configure dnsmasq to only listen on interfaces which network manager will not need.

Typiclly, this means that you can set dnsmasq.conf to only listen on your wired connection, and ignore your wifi connections that you want to share.

Once this change is made, and dnsmasq restared, nm can then invoke dnsmasq successfully.

Use of the DBUS methods would of course make this all a lot easier.

Revision history for this message
Mario Limonciello (superm1) wrote :

This has been fixed in Jaunty with today's network manager upload:

0.7.1~rc4-0ubuntu1
Published in jaunty-release 8 hours ago

network-manager (0.7.1~rc4-0ubuntu1) jaunty; urgency=low

  * upstream release 0.7.1 rc4
    + http://git.freedesktop.org/NetworkManager/NetworkManager/
    + NETWORKMANAGER_0_7 (branch)
      - dont send AT commands to serial consoles that are not using a modem driver
      - nozomi probing (LP: #351803)
      - allow users with polkit authorization to view/edit secrets for system connections
      - fix crash that might be LP: #319918
  * allow connection sharing out of the box; we add dnsmasq-base to Recommends:
    - update control

 -- Alexander Sack < <email address hidden>> Mon, 06 Apr 2009 12:43:31 +0200

Changed in network-manager (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.