Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

My problem is that at univ. each desktop computer is given a 'fake'/'cloned' MAC address which is recognised by our network and let us in without further authentication/VPN and the likes (don't ask why - stoped asking that myself. unfortunately i am the only one with linux here, the windows have cisco nac agent).

Therefore when creating a wired connection over ethernet (using NetworkManager - this is for Ubuntu 12.04 and 13.04), we are supposed to fill the box 'cloned MAC address' with the said fake MAC address given to us (MTU size is 'auto'). Using this method no VPN is necessary so no VPN is configured, just a plain ethernet connection.

However this does not work. It keeps trying to connect and never manages with all the notifications coming. When I leave the 'cloned MAC address' box empty then it connects fine, I see the connect icon OK but I am unable to access the internet (either via command line with wget or firefox) because i am not authenticated (i think they have a proxy or something, wget www.ibm.com respondes with "proxysg1...Authorization failed')

So what I did was to edit /etc/network/interfaces to become:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
# clone mac address so we can get in net as instructed by IT
hwaddress ether XX:XX:XX:XX:XX:XX

Then I realised (new to Ubuntu,old to linux) that this is not enough and I had to remove network-manager alltogether in order to start using ifup/down etc. Which I did.

% apt-get purge network-manager
% ifup eth0
no problem there, dhcp is called and we get ip with no errors and then starts the ssh server.

% ifconfig
results are below:
eth0      Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX  
          inet addr:10.10.80.125  Bcast:10.10.80.255  Mask:255.255.255.0
          inet6 addr: fe80::200:aff:fe00:40/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2529 errors:0 dropped:0 overruns:0 frame:0
          TX packets:419 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:263993 (263.9 KB)  TX bytes:58880 (58.8 KB)
          Interrupt:16 Memory:d2200000-d2220000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:178 errors:0 dropped:0 overruns:0 frame:0
          TX packets:178 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:14420 (14.4 KB)  TX bytes:14420 (14.4 KB)

Where XX:XX:XX:XX:XX:XX is the cloned MAC address given to us by IT - so all OK i assume.

At this stage I can surely connect remotely to my machine (from computer in same room, desktop ethernet) but sometimes it works and then it breaks: usual problem, I can not access any internet (wget or firefox) without being asked to be authenticated. At this stage I re-install ubuntu 12.04 and manage to have it working for a while again until after installing a few packages using apt-get.

So I upgrated to Ubuntu 13.04

at installation time from boot-cd, there was the above problem with accessing the repositories (for checking latest versions). Again it used NetworkManager which can simply not function with 'cloned MAC address' unless I am doing something wrong. At some stage after booting up with the installation cd, before installing, I switched to the console. Stopped the network manager (/etc/init.d/networking stop) and then did the old ifup thing and it worked! BUT unfortunately the whole installation crashed - something I noticed when in gnome and doing a /etc/init.d/networking restart - the window manager disappears.

In any event I proceeded with the installation of 13.04 but the installed system had the same problem (i.e. NetowrkManager 'cloned MAC address' could not connect me to the network). So again I removed the NetworkManager in the installed system and did all the steps above and it worked!

Then after installing a few packages (latest were: ubuntu-tweak, gconf-editor, okular, xpdf) using apt-get (only) the problem re-appeared - I am not authenticated BUT ifconfig has the same correct output, /etc/network/interfaces has the same contents and it all happened in mid-session no logout nor reboot. I did several ifdown/ifup/ifconfig they all show the same correct output but can't be authenticated to get to the internet BUT strangely I can ssh into the desktop from other computers in the same network/room. Oh and I did check and NetworkManager was not reinstalled without me knowing (i think).

Apart from the issue of NetworkManager can't handle the 'cloned MAC address' or me doing something wrong with it. The biggest problem is that after removing NetworkManager and had it working with ifup scripts, something (maybe apt-get post install script? maybe ubuntu-tweak which I use for only configuring gnome desktop) broke the thing.

The questions:

  1. What can I do to be 100% certain that nothing interferes with my connections apart from the traditional, old style method of ifup when using Ubuntu 13.04. E.g. will apt-get at some stage when installing something cause something to break with my network?

  2. Can anyone suggest why NetworkManager with cloned Mac address do not work but ifup works as said above (after removing NetworkManager).

  3. Can anyone suggest why when NetworkManager is either installed and running or not, /etc/init.d/networking restart kills the window manager, leaves xterms on but can't write anything in them (maybe focus is elsewhere)?

  4. I am that much to switch to Suse if it wasn't for the super-duper easy-peasy hero of softwares, love of my life: apt-get - any suggestions?

Thanks friends,

I appreciate any help, hints or words of comfort.

share|improve this question
add comment

2 Answers 2

I'm on Ubuntu 12.04.2 kernel 3.5 with the same issue as you. NetworkManager is unable to make the cloned mac address "stick" to the ethernet port (I haven't tried it with wlan). I am able to run:

ifconfig eth0 down
ifconfig eth0 hw ether XX:XX:XX:XX:XX:XX
ifconfig eth0 up

without uninstalling NetworkManager. Once I run these commands, the ethernet adapter will stick with the new, spoofed mac address, but once I disconnect ethernet, sleep the computer, or reboot, NetworkManager reverts it back to the original one.

So basically, my workaround is to run these commands before connecting to the network, and it's good enough for me. It would be REALLY nice if NetworkManager behaved as it was supposed to though.

I've filed a bug report here: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1116421

share|improve this answer
add comment

The problem has disappeared, I can now access internet as usual without authentication.

What I think helped was:

  1. dhclient -r to release the dhcp lease

  2. remove all the dhcp lease files from /var/lib/dhcp/

  3. edit /etc/network/interfaces to change the hwaddress line to something random, restart network and repeat several times, then finally restore the cloned mac address and restart network. this was done several times which leads me to think that there is something wrong with a cache somewhere in the network or dhcp server.

  4. I believe it is not related to Ubuntu messing with my settings.

  5. Any comments about this policy of giving us some lame cloned MAC address (meaning very simple number) in order to access the network? Couldn't they just register the network card real MAC and authenticate with that?

    and a very off-topic

  6. I propose an installation which asks you what percentage of resources you want to dedicate to window manager and apps and then installs the requested amount of 'funkiness' and 'pimp-me-up-ness', it's a pity to try to use this computer for scientific computing and have lots of ram dedicated to window positioning or funky animations, and then try to disable this and that and eventually break everything. Finally, it would also be useful to be able to boot with no x-server (runlevel 3) to test many things which gnome otherwise might take over. I could not manage to do that yet.

share|improve this answer
    
to your off-topic comment: have you looked at the xfce shell? there's an ubuntu flavour xubuntu that uses it as default. It's designed for low-resource computers, and installs a minimum of extra guff. –  drevicko May 7 at 2:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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