LinuxQuestions.org
Review your favorite Linux distribution.
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 04-11-2010, 04:46 PM   #1
avishorp
LQ Newbie
 
Registered: Apr 2010
Posts: 6

Rep: Reputation: 0
Receiving UDP packets


Hi folks,
I have a computer with two interfaces: a fixed connection (eth1) and a modem (ppp0). My goal is to receive UDP packets from both connections concurrently (using the recv() function).
The problem is, that the received packets reach the application only when the default gateway is set to that interface's address. For example, if I set the default gw to be in the eth1 subnet, only packets from eth1 reach the application. Other packets are received in the interface (checked using tcpdump), but they seem to be blocked somewhere.
The policy defined in iptables is "ACCEPT" for all incoming packets, with no rules at all.
I would like to know how to overcome this problem, and anyway how is the default gateway related to incoming UDP?

Thanks,
Avishay
 
Old 04-11-2010, 06:28 PM   #2
TimothyEBaldwin
Member
 
Registered: Mar 2009
Posts: 249

Rep: Reputation: 27
The reverse path filter is enabled. For IPv4 the it can be disabled until reboot by:
echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
 
Old 04-14-2010, 03:08 PM   #3
avishorp
LQ Newbie
 
Registered: Apr 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks a lot - it seem to solve the problem. I had to do it for each interface separately (/proc/sys/.../<interface name>/rp_filter), though.
 
Old 04-16-2010, 05:56 AM   #4
cola
Senior Member
 
Registered: Sep 2007
Posts: 1,045

Rep: Reputation: 65
Quote:
Originally Posted by avishorp View Post
Thanks a lot - it seem to solve the problem. I had to do it for each interface separately (/proc/sys/.../<interface name>/rp_filter), though.
Mark the thread as "[SOLVED]" if it's solved.
 
0 members found this post helpful.
  


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
Not receiving UDP data duttaa Linux - Networking 4 08-19-2009 01:51 AM
UDP: Short Packets: and UDP bad checksum: entries in dmesg minutes2memories Linux - Networking 2 02-26-2006 07:28 PM
encapsulating TCP packets in UDP packets... yoshi95 Programming 3 06-03-2004 02:53 PM
How to receive UDP and ICMP packets, by one UDP socket(PMTUD) myself_rajat Linux - Networking 0 05-28-2004 05:43 AM
Only receiving UDP packets, no TCP erevlehdeux Linux - Networking 1 04-23-2004 07:36 PM

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

All times are GMT -5. The time now is 05:50 AM.

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