You are not logged in.

#1 2013-01-29 16:47:29

yl3dy
Member
Registered: 2011-07-27
Posts: 19

[NetworkManager] Manual profile setup

Hi all.

Need to configure a profile for NetworkManager to connect to wired network with a custom MAC. Haven't found any documentation on this so tried to impovise:

[802-3-ethernet]
port=mii
mac-address=11:22:33:44:55:66      # not the original MAC of a card

[connection]
id=Telecom
uuid=ede36166-a891-4435-930e-2b4b837741e7
type=802-3-ethernet
zone=

[ipv6]
method=ignore

[ipv4]
method=auto
may-fail=false

When trying to activate NM says that "No suitable device found: no device found for connection".

Are there any manuals on how to configure NM manually (i.e. editing a config file)?

Offline

#2 2013-01-29 17:51:42

chris_l
Member
Registered: 2010-12-01
Posts: 390

Re: [NetworkManager] Manual profile setup

yl3dy wrote:

Haven't found any documentation on this so tried to impovise

Did you checked the wiki?
https://wiki.archlinux.org/index.php/MA … s_Spoofing


"open source is about choice"
No.
Open source is about opening the source code complying with this conditions, period. The ability to choose among several packages is just a nice side effect.

Offline

#3 2013-01-29 18:36:04

yl3dy
Member
Registered: 2011-07-27
Posts: 19

Re: [NetworkManager] Manual profile setup

Obviously, it is easy to do manually (well, I've configured net that way using ifconfig to be able to write here). The aim is to do it within NetworkManager profile. Also I want to do it via command line.

P.S. I do not use netcfg because it always panics when interface is already up.

Offline

#4 2013-01-29 18:37:55

chris_l
Member
Registered: 2010-12-01
Posts: 390

Re: [NetworkManager] Manual profile setup

Use the systemd unit on the wiki article to do it automatically. It would be executed before network manager. The systemd unit does not use/requires netcfg.

You'll need to change the "Before" part to "NetworkManager.service" (I think thats the name of Network Manager service; correct it as necessary) Or maybe setting it as "Before=network.target" works. Try and see.

Last edited by chris_l (2013-01-29 18:42:14)


"open source is about choice"
No.
Open source is about opening the source code complying with this conditions, period. The ability to choose among several packages is just a nice side effect.

Offline

#5 2013-01-29 18:47:21

yl3dy
Member
Registered: 2011-07-27
Posts: 19

Re: [NetworkManager] Manual profile setup

Well, I'll try to explain the other way. Sometimes I connect to wired network where my usual ethernet MAC is required, but sometimes I should set it to another one (yes, the machine is a laptop). Consequently, setting one MAC always at start won't solve the problem. I'd like that NetworkManager would set MAC for me in a profile. I'm curious how to do it manually as I don't want to install applet because I use only nmcli interface.

Offline

#6 2013-01-29 19:41:36

chris_l
Member
Registered: 2010-12-01
Posts: 390

Re: [NetworkManager] Manual profile setup

Ohh I see. Well, since you are using nmcli you are doing it manually anyway, so I would only create an script to do both steps at once.
I'm pretty sure you already thought something like that, but you'll prefer that networkmanager do it for you.

Sorry, I'm not aware of a way to make netcfg to execute arbritary commands pre-connection.

Why not only using an script that calls ip link and then nmcli?


"open source is about choice"
No.
Open source is about opening the source code complying with this conditions, period. The ability to choose among several packages is just a nice side effect.

Offline

#7 2013-01-29 20:40:44

yl3dy
Member
Registered: 2011-07-27
Posts: 19

Re: [NetworkManager] Manual profile setup

Using such a script is a sort of solution that will work, but is quite ugly IMO. I've done a research showing that it is seemingly not considered a "right thing" to make NetworkManager profile by hand, i.e. without applet. This is sad, though.

Also looked at Wicd, but it's quite featureless and documentation-less. Maybe I'll resort back to netcfg, still it has a nice feature in config to "background" while connecting at system start.

Offline

Board footer

Powered by FluxBB