You are not logged in.

#1 2013-06-04 10:38:10

Torxed
Member
Registered: 2013-01-10
Posts: 123

[SOLVED] Where did uml_utilities go?

Trying to do:

[root@host ~]# tunctl -b -u 1001

Which doesn't work because i need uml_utilities, and that package can't be found anywhere (AUR, Core, Extra)?
Any ideas to what i should do or where to get it?

I've installed bridge-utils so that works fine, now i need tunctl, or is there a equivilant?
I know OpenVPN can handle this without uml_utilities so i assume there's a workaround if this package is not supported but in that case, how?

Last edited by Torxed (2013-06-04 11:02:54)

Offline

#2 2013-06-04 10:50:55

karol
Archivist
Registered: 2009-05-06
Posts: 25,427

Re: [SOLVED] Where did uml_utilities go?

Offline

#3 2013-06-04 11:02:41

Torxed
Member
Registered: 2013-01-10
Posts: 123

Re: [SOLVED] Where did uml_utilities go?

Thank you karol, ip tuntapadd dev tap0 mode tap user torxed group kvm works perfectly smile

Offline

#4 2013-06-04 11:02:50

hiciu
Member
Registered: 2010-08-11
Posts: 77

Re: [SOLVED] Where did uml_utilities go?

Torxed wrote:
[root@host ~]# tunctl -b -u 1001

Use ip from iproute2:

$ sudo ip tuntap add dev tun0 mode tun user hiciu
$ ip tuntap                                                                                                                                                                                                  :(
tun0: tun user 1000
$ ip link show tun0
4: tun0: <POINTOPOINT,MULTICAST,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 500
    link/none 

edit: oh, I see I was too late :)

Last edited by hiciu (2013-06-04 11:03:26)

Offline

#5 2013-06-05 12:33:46

trapanator
Member
From: Italy
Registered: 2009-08-10
Posts: 137

Re: [SOLVED] Where did uml_utilities go?

Is it possible to receive the name of newly tun device with the 'ip tuntap add...' command?  i.e. tun0

Offline

#6 2013-06-05 13:01:42

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,838

Re: [SOLVED] Where did uml_utilities go?

trapanator wrote:

Is it possible to receive the name of newly tun device with the 'ip tuntap add...' command?  i.e. tun0

I couldn't find a way - it doesn't return it, and there doesn't seem to be way to know which is the one added if you list them.
I solved the issue by generating the device name and passing it to the command, that way I know what it is in my script.

Edit: thought it was my old thread, deleted irrelevant comment.

Last edited by skanky (2013-06-05 13:07:43)


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#7 2013-06-08 15:47:58

a_neutrino
Member
From: Montreal, Canada
Registered: 2010-03-14
Posts: 50
Website

Re: [SOLVED] Where did uml_utilities go?

trapanator wrote:

Is it possible to receive the name of newly tun device with the 'ip tuntap add...' command?  i.e. tun0

I wrote this script as a drop-in replacement for tunctl. If anybody has improvement ideas, please do post them!

#!/bin/bash
#
# Drop-in replacement for tunctl from the old uml_utilities
# replaced by ip from the iproute2 package.
#
# By Alexandre de Verteuil 2013-06-06.

if ! which ip &> /dev/null; then
    echo "ip not found, is iproute2 package installed?" >&2
    exit 1
fi

while getopts d:bu:t: argument
do
    case $argument in
        d)
            ip tuntap del dev "$OPTARG" mode tap
            exit $?
            ;;
        u)
            USERARG="user $OPTARG"
            ;;
        b)
            #Brief, there is no verbose.
            ;;
        t)
            DEVNAME="dev $OPTARG"
            ;;
    esac
done

# Memorize existing tap devices.
before=$(ip tuntap list | cut -d: -f1 | sort)

# Create the new tap device.
ip tuntap add $DEVNAME mode tap $DEVNAME || exit 1

# Memorize the new list of tap devices.
after=$(ip tuntap list | cut -d: -f1 | sort)

# Spit out the name of the new device, just like tunctl would do.
echo $(comm -13 <(echo "$before") <(echo "$after"))

I saved it as /usr/local/bin/tunctl.

Offline

Board footer

Powered by FluxBB