LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 01-04-2013, 12:33 AM   #1
lohit07
LQ Newbie
 
Registered: Dec 2012
Posts: 3

Rep: Reputation: Disabled
ip forwarding


Is it possible to forward the packets having "ip_forward" is 0? Is there any alternative ways to forward packets without using ip_forward command??
 
Old 01-04-2013, 03:58 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
without that set, the kernel won't forward, no. You would most likely look to proxy traffic instead, which is possible at many levels of the stack, most commonly HTTP traffic would be proxied with squid, but you can use tcp level proxying too
 
Old 01-04-2013, 04:21 AM   #3
lohit07
LQ Newbie
 
Registered: Dec 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thanks acid_kewpie.

I am trying to forward the UDP packets. I want to do from transport layer.

Can we forward packet using function "dev_hard_start_xmit" which is in net/core/dev.c in linux source code??

Thanks,
Lohit
 
Old 01-04-2013, 05:08 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
In terms of kernel programming, I really can't comment. Why can't you just enable forwarding? I presumed you were a non-root user who couldn't tweak stuff that low, but you're looking at messing with the kernel? Interesting...
 
Old 01-04-2013, 05:26 AM   #5
lohit07
LQ Newbie
 
Registered: Dec 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thanks..

I was just trying to forward packet without forward command whether it works.

I knew that i was messing with Kernel, because system was getting hanged whenever the dev_hard_start_xmit function is gets called from my driver.

I am putting hook at pre routing, putting packet in QUEUE, retrieving back pack by queue handler. Able to get back the packet.

Later i am calling function dev_hard_start_xmit and system hangs that time.

because of system hang even i am not getting what causing the system to hang.

Thanks..
 
  


Reply


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
Shorewall: port forwarding problem, port is closed even after forwarding Synt4x_3rr0r Linux - Networking 2 12-13-2009 04:36 PM
Mail Forwarding in postfix/maildrop/redhat (like yahoo mail forwarding) topcat Linux - Software 1 08-31-2007 12:10 PM
IPCHAINS port forwarding and IPTABLES port forwarding ediestajr Linux - Networking 26 01-14-2007 07:35 PM
Simple Port Forwarding Firewall - not forwarding MadTurki Linux - Security 14 04-09-2006 12:08 PM
port forwarding and packet forwarding syrtsardo Linux - Newbie 2 07-03-2003 10:37 AM


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

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