Networking Forums

Networking Forums > Computer Networking > Linux Networking > tun device

Reply
 
 
Benjamin Menküc
Guest
Posts: n/a

 
      12-30-2004, 01:54 AM
Hi,

I created a tunnel device using the kernel supported function tun_open.
Then I assigned an ip address to tun0 using ifconfig tun0 192.168.0.10.

I want to read now the plain ip packets, but how can I do this?
In my test program I have

while(1)
{
readn_t(fd_tun,buf,100,timeout); //read with timeout
printf("tun:%s\n",buf);
}

I never receive any data from the tun device.

Do I have to listen on the fd socket for incoming connects? Or How can I set
the tun device to accept every connect request?

when I do ssh 192.168.0.10 it says connection refused (Port 22).

regards,
Benjamin


 
Reply With Quote
 
 
 
 
Tauno Voipio
Guest
Posts: n/a

 
      12-30-2004, 01:19 PM
Benjamin Menküc wrote:
> Hi,
>
> I created a tunnel device using the kernel supported function tun_open.
> Then I assigned an ip address to tun0 using ifconfig tun0 192.168.0.10.
>
> I want to read now the plain ip packets, but how can I do this?
> In my test program I have
>
> while(1)
> {
> readn_t(fd_tun,buf,100,timeout); //read with timeout
> printf("tun:%s\n",buf);
> }
>
> I never receive any data from the tun device.
>
> Do I have to listen on the fd socket for incoming connects? Or How can I set
> the tun device to accept every connect request?
>
> when I do ssh 192.168.0.10 it says connection refused (Port 22).
>


You have to route / port forward the incoming packets
to the network end of the tunnel device.

--

Tauno Voipio
tauno voipio (at) iki fi


 
Reply With Quote
 
Benjamin Menküc
Guest
Posts: n/a

 
      12-30-2004, 01:27 PM
Hi Tauno,

how do I do that?

route add something?

regards,
Benjamin


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
802.11 Broadcom device missing from device manager tinanewtonart Broadband Hardware 1 03-12-2009 08:18 AM
Device Available to connect Wired router from Wireless Device? Bakshi Network Routers 2 03-22-2008 01:55 PM
Unable to remove hidden device in device manager mario Wireless Networks 9 05-10-2007 05:25 PM
802.11g router / 1 x 802.11b device / 1 x 802.11g device Oli Wireless Networks 3 09-27-2004 11:56 PM
HELP! There's an Unidentified Device on my Device Manager! > > > Alan Windows Networking 2 05-02-2004 04:24 AM



1 2 3 4 5 6 7 8 9 10 11