Networking doesn't work anymore since installing ipmasq

Bug #71468 reported by fuoco
22
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ipmasq (Ubuntu)
Invalid
Undecided
Onno Benschop

Bug Description

Binary package hint: ipmasq

I had to install dnsmasq and ipmasq to get networking in MOL (mac-on-linux) according to the guide in the wiki. It actually works and I get network access in MOL.
Later I found out that when I restart my system I don't have access to network. I found many lines in dmesg such as:

[ 232.870897] IN= OUT=eth0 SRC=192.168.1.101 DST=212.116.161.38 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=39841 DF PROTO=UDP SPT=32770 DPT=53 LEN=40

Eventually I discovered that running MOL fixes it and then I get network access on my system too (outside of MOL). I then found out that running: '/etc/init.d/ipmasq restart' will suffice to fix the problem.
Something needs to be done so it is run automatically or configured in a different way that still lets it run without MOL.

Revision history for this message
Onno Benschop (onno-itmaze) wrote :

On an up-to-date Dapper machine I see the same behaviour, that is, no connectivity until sudo ipmasq is run.

These are the steps I've tried:
Proposed Fix:
  sudo ln -s /etc/init.d/ipmasq /etc/rc2.d/K01ipmasq
  sudo ln -s /etc/init.d/ipmasq /etc/rc2.d/S99ipmasq
Source:
  http://ubuntuforums.org/showthread.php?p=2631864

This did not work.

2nd Proposed Fix:
  dpkg-reconfigure ipmasq
Chose to start ipmasq after network interfaces are started. Was set to after services are up.
Source:
  http://gearspot.blogspot.com/2007/04/howto-share-internet-connection.html

This did not work.

Now I have no solution.

Changed in ipmasq:
status: Unconfirmed → Confirmed
Revision history for this message
Onno Benschop (onno-itmaze) wrote :

Two more people are experiencing this also:
  http://ubuntuforums.org/showthread.php?t=333918

Revision history for this message
Onno Benschop (onno-itmaze) wrote :

3rd Proposed fix:

Add these lines to /etc/rc.local, before the line exit 0:
  ifdown eth1
  ifup eth1
  ipmasq

Source:
  http://ubuntuforums.org/showthread.php?t=247445

Also does not work :-(

Revision history for this message
Onno Benschop (onno-itmaze) wrote :

Hmm, actually, the 3rd fix does appear to work.

Changed in ipmasq:
assignee: nobody → onno-itmaze
Revision history for this message
Onno Benschop (onno-itmaze) wrote :

At present it is assumed that this bug is in dapper. I will attempt to test this in gusty and see if it recurs or not.

Revision history for this message
bernhard (bernhardredl) wrote :

i testet too and got the following:

i have 2 feisty pcs and one has a pppoe intenret dialup connection.

I copied lots of files from the pc without internet to mine (with internet)
after some time and traffic the network broke down.

It was not possible that i ping the other pc and he couldn't ping mine. Restarting the other pc does not help

i tried on mine (wiht the internet and dnsmasq and ipmasq)
/etc/ini.d/dnsmasq restart
/etc/init.d/ipmasq restart
/etc/init.d/networking restart

the only thing that helps was restartin my maschine (the internet maschein)

It seems to be a traffic issue because if had it two times while copying large amounts of data.
Wioth normal traffic it works for about 2h that it crashes.

is also got lots of these
[ 232.870897] IN= OUT=eth0 SRC=192.168.1.101 DST=212.116.161.38 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=39841 DF PROTO=UDP SPT=32770 DPT=53 LEN=40

but execpt them no strange errors in logs

Revision history for this message
david_kt (d-kuntadi) wrote :

I installed ipmasq on intrepid and I face the same problem. I need to run:

sudo /etc/init.d/ipmasq restart

in order to connect to internet every time I reboot my computer. Editing /etc/rc.local does not help. May be it was due to /etc/networking/interfaces is blank on intrepid? Where is the network setting reside now? I noticed I do not need to sudo when editing network on intrepid.

David

Revision history for this message
david_kt (d-kuntadi) wrote :

I proceed to add static network in /etc/networking/interfaces, hoping that ipmasq would start properly if networks are static.
But I think there is another bug on this, the LAN network was automatically disable (black listed?) by Network Manager.

I tried to remove network manager, but dns became not available any more.

David

Revision history for this message
Brezhonneg (fricompte) wrote :

Did anybody find any explanation or solution to this 2+ year old problem?

I do have this problem on Jaunty alpha 5 (completely updated as of today). As said above, moving ipmasq to S99 in rcx.d did not help. Adding a 'service ipmasq restart' in rc.local did the trick once, but only once...

Maybe that is related (or maybe not): I also see an unusual line at boot that says that sshd is restarted. That usually comes so late in the boot process that this message appears on the CLI login prompt. So, to make this clear, I have the normal message that says that sshd is started, and then the restart message later on. The one time where adding ipmasq in rc.local did the trick, that sshd restart message appeared much earlier. I do not really know what is the cause / consequence relation here, as I cannot figure out what is causing this sshd restart... Maybe what restarts sshd is also what makes the late ipmasq restart mandatory...

Anyways, I am using a Jaunty server alpha 5 installation. ipmasq, dnsmasq (used as DHCP server as well), hostapd are all started at boot. Of course network manager is not even installed on this box...

Revision history for this message
Mr. Captcha (mr-captcha) wrote :

I still have the same bug on Ubuntu jaunty. (kernel 2.6.27-14)

After a restart i have no connection through the NIC, connected to the Internet. A the beginning I have no connection through the destinated NIC.

I have 3 interfaces: eth2 connected to the Internet, eth1 connected to a local network and eth0 there nothing is connected at the moment but from this interface packets should be routed to eth2.

After a sudo /etc/init.d/ipmasq restart everything works fine, but I have to do it each time after a restart.

I try an other configuration: In the beginning I have said that ipmasq should start after the interface is connected and now it should start "After network interfaces are brought up".

The fact is that ipmasq blocks the traffic from the routing computer if it's not set up correctly.

Revision history for this message
Mr. Captcha (mr-captcha) wrote :

It worked.

Do the following:

sudo dpkg-reconfigure ipmasq
and choose: "After network interfaces are brought up"

Than you will have no problem anymore.

Revision history for this message
Rokas (rockasd) wrote :

I've done internet sharing commands, but never had this problem until last week.
I did "sudo dpkg-reconfigure ipmasq"
Did not work.
then:
sudo nano /etc/network/interfaces
I added lines:
"auto eth1
iface eth1 inet dhcp"
for my card, which connects to the internet.
Then it worked!

Revision history for this message
Lasse (lengblom) wrote :

I have found the culprit! To me it looked like different solutions worked sometimes for some and sometimes for other and that there is no universal solution. I realized that this bug is triggered because of a race condition.

The network is not up after the network init script has finished, it is a little delay there. Hence ipmasq is run to early. I added "sleep 5" to the network script before it is finished and everything started to work!

Revision history for this message
Martin Lindhe (martinlindhe) wrote :

I have had this bug on my ubuntu 9.04 install since i setup ipmasq.
Today i added my /etc/network/interfaces instead, and now ipmasq is working perfectly all the time!

I think the problem is actually NetworkManager starting too late (after ipmasq?)

Revision history for this message
Phillip Susi (psusi) wrote :

This package has been removed from Ubuntu. Closing all related bugs.

Changed in ipmasq (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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