Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I would appreciate if someone can help me. I am forwarding IP pkts from eth1 to eth2 and eth2 to eth1. I do see all of the TCP traffic with out any problem. However, I do not see any UDP traffic flow. What I really want is to forward all of the TCP as well UDP traffic in both direction.
The ip_forward kernel setting is agnostic with respect to TCP vs. UDP, so I’ll guess the problem is your netfilter setup. Would you please post the output of “iptables-save”?
Thank you sir, Here is my current route table. TCP pkt. goes thru IPforward ports (eth1 and eth2)but no UDP. when UDP traffic comes from eth1 --> eth2 that is where it start dropping. Any suggestion greatly appricated.
[root@localhost ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
63.243.29.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
Distribution: RedHat, Slackware, Experimenting with FreeBSD
Posts: 222
Rep:
Quote:
Originally Posted by jay123
/sbin/iptables -A FORWARD -o eth1 -p udp --dport 1:65500 -m state --state NEW, ESTABLISHED, RELATED -j ACCEPT
/sbin/iptables -A FORWARD -o eth2 -p udp –dport 1:65500 -m state --state ESTABLISHED, RELATED -j ACCEPT
Tks,
Jay
Just a sanity check but will the state module work in this case? UDP being a stateless protocol and all. Try the same command without the -m state section:
hi,
u misunderstood,I dont say to flush the rules but i ask to do service iptables stop.
After then if everything works fine, then we shall deal with iptables.
First,this is temporary ,When u restart it will gone
Quote:
echo 1 >/proc/sys/net/ipv4/ip_forward
U have to make entry in /etc/sysctl.conf
That activates only the forwarding feature of kernel.U have to denote the interfaces
For the purpose u can use either routeadd command or an entry in /etc/sysconfig/static-routes like
any net X netmask Y gw Z dev A
It explains any packet destined for X (Ex 192.168.1.0) with subnet mask Y (Ex 255.255.255.0) can be sent out through A (Ex eth0) via the Z gateway.
- I have also enable IP forward by typing “echo 1 >/proc/sys/net/ipv4/ip_forward”. Not sure if “route add” can help here. I will try next adding route next. Any suggestion?
- I have Video software that can be configure for TCP or UDP. It is server and client base. Typical VOICE traffic and video conference software also used UDP traffic.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.