LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-21-2011, 09:24 AM   #1
lanilsson
LQ Newbie
 
Registered: Sep 2006
Location: San Diego, Sweden, The World
Distribution: Ubuntu, Debian
Posts: 5

Rep: Reputation: 1
Relay Raw ICMP packet to local destination


Hi all,

On my system, I have built my own tunneling protocol, where I relay packets over a non-standardized but verified medium. What I do is capture the packets using iptables and NFQUEUE, relay them over my medium, and at the other end I reinject them using raw sockets. The packet going into the tunnel is exactly the same as the one coming out, verified. The problem is that this doesn't work for ICMP Ping (Echo Request) if the destination of the ping is the same as the tunnel endpoint. If the destination is not the same as the tunnel endpoint, the ping packet is rerouted and arrives as it should at the receiver, and the ping reply comes back to the sender. Does anyone know whats going on? Isn't it possible to send raw icmp to yourself? If not, anyone have an idea what I should do instead?

What I have is:

R1 ---- T1 -----T2 ------ R2

R1 pings R2.

R1, R2, router 1 and router 2 T1, T2, Tunnel Points 1 and 2. (R1 and T1 located on the same router, and R2 and T2 on the same router). This setup does not work.

This do work:

R1 ---- T1 -----T2 ------ R2 ----- R3

R1 ping R3, this works.

Any ideas?

/Andy

Last edited by lanilsson; 02-21-2011 at 10:12 AM.
 
Old 02-22-2011, 05:34 PM   #2
TimothyEBaldwin
Member
 
Registered: Mar 2009
Posts: 249

Rep: Reputation: 27
You should be using the tuntap driver, rather than NFQUEUE and raw sockets.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ICMP Destination Unreachable (Host administratively prohibited) jiml8 Linux - Networking 7 04-25-2013 04:07 AM
Raw UDP Socket and ICMP Destination (Port) Unreachable bobble Programming 5 07-06-2011 04:07 AM
Per-Packet or Per Destination? caps_phisto Linux - Networking 1 09-30-2006 08:16 AM
New ICMP Packet Creation kaustubh_pict Linux - Networking 2 03-02-2006 12:00 PM
ICMP Packet capture SaTaN Programming 1 01-19-2004 11:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration