LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-25-2008, 08:55 AM   #1
vikasmca05
LQ Newbie
 
Registered: Mar 2008
Posts: 3

Rep: Reputation: 0
ipv6 redirecting to loopback address


Sir I am trying to capture the IPv6 packet through libpcap utility.
I am sending the packet to the IPv6 host in my subnet , and want that
all the packets should be redirected to loopbackaddress, where it can
be captured.But the packets destined for the destination address are
not taking the loopback address.I have statically configured the
gateway of the destination as ::1.
 
Old 03-25-2008, 02:16 PM   #2
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,893

Rep: Reputation: 68
Packet on local subnet are not routed through gateway, they are sent directly. But what are you trying to achieve? If you are root on localhost, run tcpdump or wireshark, catching well-formed outgoing IP packets is usually easy with such applications.
 
Old 03-25-2008, 11:21 PM   #3
vikasmca05
LQ Newbie
 
Registered: Mar 2008
Posts: 3

Original Poster
Rep: Reputation: 0
I am developing Fragroute for IPv6, for which i am redirecting the ipv6 packets to loopback address and then where i am manipulating the fields of the packet.And then resending them to there original destination.
But firstly I have to redirect them to the loopback address, can you please suggest something for this.Its urgent!!!
 
Old 03-27-2008, 05:30 PM   #4
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,893

Rep: Reputation: 68
Look at what tcpdump does.. Use libpcap. You do not need to change gateway - it doesn't work. You can try to achieve something by weird firewall rules, but actually you need just to use libpcap and simply capture the packets.
 
Old 03-27-2008, 11:24 PM   #5
vikasmca05
LQ Newbie
 
Registered: Mar 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Actually i have to send back the packets from eth0 interface to the loopback address.
Because if i capture the packet at eth0 interface then original packets will also be sent which i dont want,
I want that only the packets manipulated by me to be sent.
I am also searching for how to know the MAC address of the IPv6 destination, if anyone can please come out with this too..........
 
Old 03-29-2008, 04:26 PM   #6
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,893

Rep: Reputation: 68
Try netmask /128. And don't forget to use raw sockets (not IP ones) when sending processed packets from your program..
 
Old 05-06-2009, 02:23 AM   #7
stsi
LQ Newbie
 
Registered: May 2009
Posts: 2

Rep: Reputation: 0
There is no way in linux to route IPv6 traffic via loopback - see
the following comment in net/ipv6/route.c ip6_route_add() function:

/* We cannot add true routes via loopback here,
they would result in kernel looping; promote them to reject routes
*/
 
Old 05-06-2009, 02:24 AM   #8
stsi
LQ Newbie
 
Registered: May 2009
Posts: 2

Rep: Reputation: 0
I've created IPv6-enabled fragroute that works via /dev/net/tun:
http://code.google.com/p/fragroute-ipv6/
 
  


Reply

Tags
capture, ipv6, loopback, packet, route


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to set IPv6 address on IPv6 router tlemons Linux - Networking 3 09-17-2007 01:25 PM
internal modem loopback address sumathi Linux - Hardware 3 07-28-2005 06:50 AM
getting IPv6 address lacitpo Linux - Networking 1 03-18-2005 11:09 AM
Apache redirecting to IP address di11rod Linux - Software 6 06-03-2004 06:18 PM
Redirecting non-user mail to a local address? Trent Hatred Red Hat 2 11-19-2003 10:59 AM


All times are GMT -5. The time now is 08:05 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration