From: Dariusz Dwornikowski Date: Fri, 17 Jun 2005 17:28:07 +0000 Subject: Re: [LARTC] linux ip forwarding problem Message-Id: <20050617192807.69642e7e@tdi.pozman.pl> MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============1073002851==" List-Id: References: <19858.161.114.64.75.1119028463.squirrel@mail.cce.hp.com> In-Reply-To: <19858.161.114.64.75.1119028463.squirrel@mail.cce.hp.com> To: lartc@vger.kernel.org --===============1073002851== Content-Type: multipart/signed; boundary=Signature_Fri__17_Jun_2005_19_28_07_+0200_0WFZyXcHQGNP5RRw; protocol="application/pgp-signature"; micalg=pgp-sha1 --Signature_Fri__17_Jun_2005_19_28_07_+0200_0WFZyXcHQGNP5RRw Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Fri, 17 Jun 2005 13:14:23 -0400 (EDT) "Ji Li" wrote: > Hi, > I have three linux machines, and I want to let one of them forward packets > betwen the other two. The forwarding node has two ethernet cards, > connecting the two two machines respectively. However, when I ping between > the two end points, the forwarding node can receive the ping requests at > its eth0, but it never forwards them to its eth1. So is the reverse > direction. >=20 > The forwarding node is Redhat 7.2, kernel 2.4.7-10. The two end points are > FC3, 2.6.9-1.667smp. >=20 > What we have done to enable IP forwarding on the RH7.2 node are: > (1) In /etc/sysconfig/network, add "FORWARD_IPV4=3Dyes" > (2) "echo 1 > /proc/sys/net/ipv4/ip_forward". > (3) Change "net.ipv4.ip_forward=3D1" in /etc/sysctl.conf. > (4) > "echo 0 > /proc/sys/net/ipv4/conf/eth0/rp_filter" > "echo 0 > /proc/sys/net/ipv4/conf/eth1/rp_filter" > (5) We tried "iptables -F" to flush the rules, but ip forwarding still > doesn' work, so we add some rules as follows. We run "iptables" to > configure firewall to enable IP forwarding. > iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT > iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT route add net comp1-net gw comp1-ip route add net comp2-net gw comp2-ip on router . --=20 *Dariusz 'tdi' Dwornikowski | Gentoo | admin at pozman.pl | *[JID]:tdi@gentoo.pl|[gg]:2266034|[IRC]:#gentoo-pl@freenode | *[MAIL]:tdi@pozman.pl|[WWW]:www.tdi.pozman.pl |=20 *Serwery,administracja,webapps - www.ProAdmin.com.pl | *Fingerprint:43E21CC46DAFD2F754E91547D59B39F56AAA4B5F | --Signature_Fri__17_Jun_2005_19_28_07_+0200_0WFZyXcHQGNP5RRw Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCswgp1Zs59WqqS18RAjBoAJ98ETRve6ZJh60kktDtlVGvMQWJSwCgq7Pv 2R53MiUYq30iMCOZmtjwE8g= =SY54 -----END PGP SIGNATURE----- --Signature_Fri__17_Jun_2005_19_28_07_+0200_0WFZyXcHQGNP5RRw-- --===============1073002851== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc --===============1073002851==--