TUN/TAP configuration,

"Taner Kurtulus" <[email protected]> Tue, 24 Jul 2007 11:05:48 +0300
Newsgroups gmane.linux.redhat.ppp
Message-ID <[email protected]>
Hi,
I have a problem while giving an ip address to an tun/tap interface.

I am using tap device to get Ethernet frames to user space. I have
managed to do that. And also I could give an IP address to that tun
interface as root. But my problem is that I want to set the ip address
of that interface as a regular user. Could you give me some advices to
be able to achieve.

While I am root, I used ifconfig to set the ip address. It also sets
the routing table. But when I tried it as a regular user, I get
"permission denied!" message. After that I have changed the user
rights of  /dev/net/tun to 777. Then I could get access (open) to
/dev/net/tun interface . But when I run the ifconfig, I get the error
below :(

/sbin/ifconfig tap0 10.0.0.1 netmask 255.255.255.0 -arp
SIOCSIFADDR: Permission denied
SIOCSIFFLAGS: Permission denied
SIOCSIFNETMASK: Permission denied
SIOCSIFBROADCAST: Permission denied
SIOCSIFFLAGS: Permission denied
system: Success

Could you tell me, how can I configure the ip address a regular user?
I can give right to specific a user. If this is a solution, can you
tell me, how I will give the rights. I am a newbie on linux :(

Thank you for your help and interest :)