Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 06-10-2009, 12:33 AM   #1
LQ Newbie
Registered: Feb 2009
Posts: 11

Rep: Reputation: 0
Unhappy Routing IP Packet from user Application using rawsocket

hi all,

I am using Rawsockets for writing the IP packets to the network. But the packet which i write is loop backed again to the filter input. Any ideas or pointer will be useful.

My requirement is to route the IP packets written in raw sockets to another machine using the eth0 device

RAW SOCKET <---> eth0( <----> machine2 (

I have written a small program to test the above description. The packet which i write using the raw socket option is taken over by the loop back device. How do I route the packet via eth0.

my eth0 ip is

I tried using ip tables
iptables -t mangle -I POSTROUTING -o eth0 -j ACCEPT
I tried using ip rules -
ip rule add to lookup 7
ip route add default dev eth0 table 7
nothing worked out

Please help me in this regard

Alan J


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
Knowing when a packet is dropped due to a routing decision techmex Linux - Networking 6 01-30-2009 12:32 PM
Packet Routing for Connection Sharing corteplaneta Slackware 11 10-20-2008 11:02 PM
Packet Routing/Forwarding/Whatever Setup Help kromberg Linux - Networking 2 01-18-2008 05:24 PM
packet cloning and routing with single NIC gianman Linux - Networking 0 11-10-2006 11:33 AM
Packet Filter to redirect a packet to a user level process akawale Linux - Networking 3 09-01-2006 01:06 PM > Forums > Linux Forums > Linux - Networking

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

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