From: "Matthew Simpson" <matthew@txlink.net>
To: netfilter@lists.netfilter.org
Cc: antony@soft-solutions.co.uk
Subject: Re: netfilter digest, Vol 1 #1410 - 14 msgs
Date: Tue, 23 Dec 2003 10:28:10 -0600 [thread overview]
Message-ID: <009d01c3c971$c142be10$0100a8c0@KARI> (raw)
In-Reply-To: 20031223161403.3308.78203.Mailman@netfilter-sponsored-by.noris.net
Message: 11
From: Antony Stone <Antony@Soft-Solutions.co.uk>
To: <netfilter@lists.netfilter.org>
Subject: Re: using iptables to route between public networks
Date: Tue, 23 Dec 2003 15:42:48 +0000
On Tuesday 23 December 2003 3:32 pm, Matthew Simpson wrote:
>> I must have been doing something stupid last night, because I retried it
>> this morning and it works. Here is what I have for the forward chain:
>>
>> $IPTABLES -A FORWARD -d 209.210.10.1/28 -j ACCEPT
>> $IPTABLES -A FORWARD -d ! 209.210.10.1/28 -j DROP
>> $IPTABLES -P FORWARD ACCEPT
>> $IPTABLES -F FORWARD
>>
>> This works.
>When you say "this works", is assume that's only for minimal values of
>"working" :)
>
>I can't believe that a router which will drop all packets except those
>addressed to 209.210.10.0/28 (note that your address designation is
slightly
>incorrect above) will do an effective job.
Putting 209.210.10.0/28 is what 'broke' things last night. If I change my
script to that, then it doesn't add that rule to the FORWARD chain. It
doesn't output any error, but it doesn't add the rule, either.
>
>You may want to route inbound packets only to these IP addresses, but what
>about the replies? They are going to be going to other destination
>addresses, and need routing too.....
Correct me if I'm wrong, but doesn't the -destination flag only drop
incoming FORWARD packets that do not have a DESTINATION of 209.210.10.1/28 ?
Therefore any packets coming from the 209.210.10.1/28 subnet will be able to
go out unimpeded because I have the default policy to ACCEPT the FORWARD
packets. I'm only dropping packets that are coming in the FORWARD chain and
are not addressed to my network.
This IS working like I want it to, I can telnet for example to 209.210.10.11
and things work fine, I can go out from 209.210.10.11, and I can ping
209.210.10.11 from the outside.
>Antony.
parent reply other threads:[~2003-12-23 16:28 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20031223161403.3308.78203.Mailman@netfilter-sponsored-by.noris.net>]
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='009d01c3c971$c142be10$0100a8c0@KARI' \
--to=matthew@txlink.net \
--cc=antony@soft-solutions.co.uk \
--cc=netfilter@lists.netfilter.org \
/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