LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 06-09-2009, 11:33 PM   #1
johnniealan
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(10.66.67.208) <----> machine2 (10.66.67.220)

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 10.66.67.208

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


Please help me in this regard

Alan J
 
  


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

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

All times are GMT -5. The time now is 04:17 PM.

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