LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   ip forwarding (https://www.linuxquestions.org/questions/linux-networking-3/ip-forwarding-4175444087/)

lohit07 01-04-2013 12:33 AM

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??

acid_kewpie 01-04-2013 03:58 AM

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

lohit07 01-04-2013 04:21 AM

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

acid_kewpie 01-04-2013 05:08 AM

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...

lohit07 01-04-2013 05:26 AM

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..


All times are GMT -5. The time now is 02:45 PM.