From: "Jose Luis Hime" <jhime@synchro.com.br>
To: tsh@mrc-lmb.cam.ac.uk, netfilter@lists.netfilter.org
Subject: RE: routing between 2 nets on same LAN
Date: Mon, 2 Jun 2003 13:58:37 -0300 [thread overview]
Message-ID: <005b01c32928$36385d00$010319ac@jhime> (raw)
In-Reply-To: <200306021439.PAA426195@alf1.mrc-lmb.cam.ac.uk>
It seems that you missed the INPUT chain: you must accept INPUT before
FORWARD.
But first of all, try 'debugging' your network removing all iptables
rules and setting the default policies to "ACCEPT". You should see
packets going from one "LAN" to other.
One more doubt: did you check that the default gateway of your
workstations are correctly set?
Regards,
Jose Hime
-----Original Message-----
From: netfilter-admin@lists.netfilter.org
[mailto:netfilter-admin@lists.netfilter.org]On Behalf Of
tsh@mrc-lmb.cam.ac.uk
Sent: Monday, June 02, 2003 11:39 AM
To: netfilter@lists.netfilter.org
Subject: routing between 2 nets on same LAN
I sent this before subscribing to the list, so apologies
to the moderator for duplication.
I'm trying to use iptables to route between two networks
on the same LAN. I'm attempting to migrate our ip addresses
from a bunch of global subnets (131.111.x/y/z.*) to
10. and to use NAT thereafter, and I was hoping to
be able to use iptables to route between these address
ranges whilst the migration was in progress.
I have entries like:
iptables -A FORWARD -i eth0 -o eth0 -s 131.111.26.0/24 -d 10.0.0.0/9
iptables -A FORWARD -i eth0 -o eth0 -d 10.0.0.0/9 -s 131.111.26.0/24
and IP_FORWARDING turned on, but when I try 'ping 131.111.26.1' from
10.0.0.1, I get no ICMP echo. On the iptables box,
tcpdump -i eth0 src 10.0.0.1 dst 131.111.26.1
sees the ICMP packets. The firewall eth0 has 2 ip addresses,
131.111.26.200 and 10.0.0.200 ('using ip address add').
10.0.0.1 has 10.0.0.200 as its default router and 131.111.26.1 has
131.111.26.200 as its default router. Each can successfully ping,
and be ping'd by, the firewall.
Is it legit in iptables to have the FORWARD input and output
interfaces the same? Or am I doing something wrong?
Cheers,
Terry.
Terry Horsnell (tsh@mrc-lmb.cam.ac.uk)
I.T. Manager
Medical Research Council
Lab of Molecular Biology
Hills Road
CAMBRIDGE CB2 2QH
U.K.
Phone: +44 (0)1223 248011
Fax: +44 (0)1223 213556
next prev parent reply other threads:[~2003-06-02 16:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-02 14:39 routing between 2 nets on same LAN tsh
2003-06-02 16:58 ` Jose Luis Hime [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-06-02 22:44 George Vieira
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='005b01c32928$36385d00$010319ac@jhime' \
--to=jhime@synchro.com.br \
--cc=netfilter@lists.netfilter.org \
--cc=tsh@mrc-lmb.cam.ac.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox