I haven't yet got a response for this on the users list and so, am 
forwarding it to the devel list.

Hope someone out here knows the answer to this.

Thanks!
Harsha

----------------------------------------------------------------------------
University of Washington  |  http://www.cs.washington.edu/homes/harsha/
har...@cs.washington.edu  |  http://harshaandsports.blogspot.com/
----------------------------------------------------------------------------

---------- Forwarded message ----------
List-Post: openvpn-devel@lists.sourceforge.net
Date: Mon, 16 May 2005 00:17:21 -0700 (PDT)
From: Harsha V. Madhyastha <har...@cs.washington.edu>
To: openvpn-us...@lists.sourceforge.net
Subject: What happens to raw IP packets written to the TUN device?

Hi everyone,

I had written about this problem to the list a couple of months back and 
hadn't received any relevant response. So, I am presenting the same 
problem in a different light now. Hopefully one of you will be able to 
help me out.

The basic question is as follows. Suppose I open a WIN32 HANDLE on the 
TUN/TAP device and then write a raw packet inclusive of IP header to it 
(the packet is destined to destination D), is it reasonable to expect 
that the packet will be sent out to D via the normal eth0 interface? 
(assuming the routing table is such that packets to destination D should 
be routed to eth0). Similarly, on Linux, if I open a file descriptor on 
/dev/net/tun and write a raw packet to it, will it be forwarded to the 
eth0 interface?

One of the responses to my previous email had suggested that I did not 
have forwarding enabled, and as suggested, I executed on Linux
"echo 1 > /proc/sys/net/ipv4/ip_forward"
and also, added "iptables -A FORWARD -j ACCEPT", but that did not help.

The main point of confusion is that when I write raw packets with local IP 
address as the destination address, the packet gets forwarded to the 
appropriate application, but when I write raw packets destined to other 
addresses, the packet just disappears! So, I am beginning to doubt whether 
the TUN interface is meant to be such that raw packets will get forwarded 
to the appropriate interface. Please note that I am using the TUN/TAP 
device installed by OpenVPN on Windows XP and I'm using the standard 
/dev/net/tun device on Linux, and the same problem is seen on both.

Please let me know if you need more details to understand the problem. I 
would be glad to divulge as much information as you need. I hope one of 
you will respond to my call for help!

Thanks!
Harsha

----------------------------------------------------------------------------
University of Washington  |  http://www.cs.washington.edu/homes/harsha/
har...@cs.washington.edu  |  http://harshaandsports.blogspot.com/
----------------------------------------------------------------------------

Reply via email to