Re: ifconfig(8) --frontend

2013-08-09 Thread Craig R. Skinner
On 2013-08-04 Sun 14:30 PM |, Gregor Best wrote:
 
 known wireless ESSIDs, known gateway MAC addresses and known network
 topologies, for example When I'm at home, my gateway is 192.168.2.1,
 there's a host named Zim and one named Gir and my public IP address
 resolves back to Unity Media. That's probably unportable and needs to
 be reimplemented for every user.
 

Maybe knock up a config file for all your specific stuff?
-- 
Craig Skinner | http://twitter.com/Craig_Skinner | http://linkd.in/yGqkv7



Re: ifconfig(8) --frontend

2013-08-05 Thread Erling Westenvik
On Sun, Aug 04, 2013 at 12:07:29PM +0200, Mirco Richter wrote:
 Is there some GUI-front-end for (at least) the wlan related
 functionality of ifconfig?

Not a GUI, but I'm using a script called wiconfig which is discussed at:

http://undeadly.org/cgi?action=articlesid=20120113172334

Currently I'm running it on a ThinkPad T500 with CURRENT and an old HP
laptop running 5.3 RELEASE. Works great. I can suspend my laptop at
home, go over to my girlfriends place and, upon resume, it'll
automatically connect to her WiFi. The same thing if there are no WiFi
available except for my Android phone in hotspot-mode. There a some
security concerns though. Read the article at Undeadly.

Regards,

Erling

 (No need to argue here, about the flexability of ifconfig and the
 restrictions of any GUI-approach)
 
 The point is, that using OBSD as a workstation on a laptop, requires a
 lot of authentification at different WPA/WEP encrypted wlan networks,
 some with PSK, some in enterprise mode and whoknowswhatelse ...
 
 Doing this on the terminal is simply a waste of time and it would be
 rational to have a GUI for at least this subset of the full ifconfig
 functionality.
 
 Does anyone know of an approach here? For now dependencies like GTK ||
 qt doesn't matter
 
 /mirco   



ifconfig(8) --frontend

2013-08-04 Thread Mirco Richter
Is there some GUI-front-end for (at least) the wlan related functionality of 
ifconfig?

(No need to argue here, about the flexability of ifconfig and the restrictions 
of
any GUI-approach)

The point is, that using OBSD as a workstation on a laptop, requires a lot of 
authentification at different WPA/WEP encrypted wlan networks, some with PSK,
some in enterprise mode and whoknowswhatelse ...

Doing this on the terminal is simply a waste of time and it would be rational
to have a GUI for at least this subset of the full ifconfig functionality.

Does anyone know of an approach here? For now dependencies like GTK || qt 
doesn't matter

/mirco   



Re: ifconfig(8) --frontend

2013-08-04 Thread Peter N. M. Hansteen
Mirco Richter mirco.rich...@email.de writes:

 Is there some GUI-front-end for (at least) the wlan related functionality of 
 ifconfig?

http://www.undeadly.org/cgi?action=articlesid=20110420080633 hints
that M:tier (http://www.mtier.org/) has something of that sort, but I
can't specifically remember whether they've made it available to the
general public.

- Peter
-- 
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
Remember to set the evil bit on all malicious network traffic
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.



Re: ifconfig(8) --frontend

2013-08-04 Thread Stefan Sperling
On Sun, Aug 04, 2013 at 12:07:29PM +0200, Mirco Richter wrote:
 Is there some GUI-front-end for (at least) the wlan related functionality of 
 ifconfig?
 
 (No need to argue here, about the flexability of ifconfig and the 
 restrictions of
 any GUI-approach)
 
 The point is, that using OBSD as a workstation on a laptop, requires a lot of 
 authentification at different WPA/WEP encrypted wlan networks, some with PSK,
 some in enterprise mode and whoknowswhatelse ...
 
 Doing this on the terminal is simply a waste of time and it would be rational
 to have a GUI for at least this subset of the full ifconfig functionality.
 
 Does anyone know of an approach here? For now dependencies like GTK || qt 
 doesn't matter
 
 /mirco   

I've looked into porting network manager and wcid some time back.
It's horrid. They both rely on Linux-specific features like udev
so it's not trivial to port them. Also, not everyone running
OpenBSD will be willing to trust these tools.

I think it would be better to spend time on making the kernel join
known encrypted wireless networks just like it joins non-encrypted ones.
After all, the real issue lies with configuring the link layer.
As soon as there is a link people can use DHCP/autoconf as usual.

So you would have hostname.if files such as:

 nwid mynet wpakey mysecretkey
 nwid some-other-net nwkey wepkey
 -nwid

The last line switches back to any essid mode, and the interface
would now join any of the listed networks within range, even if
encrypted. Or it could be forced to a particular network without
requiring the password again, e.g. 'ifconfig ral0 nwid mynet'.

Right now the kernel discards the previously used key when a new key is set.
So this would require a password cache in the kernel, which would have to
be limited in size. But in practice that should be enough to automatically
connect to a set of commonly used networks. I've got a rough start of a
proof-of-concept patch for this but there are some bugs I need to figure
out before sharing my patch becomes useful. If you'd like to help hacking
on it please let me know. Perhaps the idea is stupid and won't really work
as I imagine it. But I believe it's worth trying, I also find it annoying
to manually configure wireless all the time.

WPA enterprise is another story because keys aren't known in advance.
But it's not supported out of the box in the base system anyway right now.



Re: ifconfig(8) --frontend

2013-08-04 Thread Henri Kemppainen
 Doing this on the terminal is simply a waste of time and it would be rational
 to have a GUI for at least this subset of the full ifconfig functionality.

Care to elaborate on that?  What makes it slow for you on the terminal?  What
would a GUI need to have to be faster?  Don't tell me you want 3D-accelerated
kitty pics.



Re: ifconfig(8) --frontend

2013-08-04 Thread Gregor Best
I don't use a GUI but I hacked together a little Python script that
basically calls `ifconfig wpi0 scan` to obtain a list of available
networks, filters out the known ones, sorts them by priority and signal
strength and then configures the one on the top of the list with
ifconfig and if need be, with wpa supplicant.

The priority and strength sorting is done so I can have multiple
wireless networks in the same location configured and readily available.

Then I have a script that pings the current IPv4 gateway, or, if that is
not available, IPv6 gateway, and once 5 or more packets are missed, just
calls /etc/netstart. The /etc/hostname.if file for wpi0 calls the Python
script and the /etc/hostname.if for trunk0 configures everything for
DHCP. I do this because I have a wireless + wired trunk for transparent
switchover.

If there's a demand, I can upload the scripts somewhere. There is also
some Set up VPNs if I am in an untrusted location-stuff in there but
it relies on some way to identify the network one is currently attached
to. This is currently done by a shell script that checks for things like
known wireless ESSIDs, known gateway MAC addresses and known network
topologies, for example When I'm at home, my gateway is 192.168.2.1,
there's a host named Zim and one named Gir and my public IP address
resolves back to Unity Media. That's probably unportable and needs to
be reimplemented for every user.

-- 
Gregor Best



Re: ifconfig(8) --frontend

2013-08-04 Thread David Coppa
On Sun, Aug 4, 2013 at 2:04 PM, Stefan Sperling s...@openbsd.org wrote:

 I've looked into porting network manager and wcid some time back.
 It's horrid. They both rely on Linux-specific features like udev
 so it's not trivial to port them.

Maybe porting the one below could be easier:

https://github.com/pcbsd/pcbsd/tree/master/src-qt4/pc-netmanager

ciao,
David