From: "Wouter Coppens" <wouter.coppens@pandora.be>
To: netfilter@lists.netfilter.org
Subject: Performance of netfilter
Date: Tue, 3 Dec 2002 22:43:10 +0100 (Romance Standard Time) [thread overview]
Message-ID: <3DED256E.000009.01744@yoda> (raw)
I can create to sets of rules that will give me the same result:
Case 1)
iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -d 10.10.10.1 -p tcp -m multiport --ports 80,443,8080
iptables -A FORWARD -d 10.10.10.2-p tcp -m multiport --ports 80,443,8080
iptables -A FORWARD -d 10.10.10.3-p tcp -m multiport --ports 80,443,8080
iptables -A FORWARD -d 10.10.10.4-p tcp -m multiport --ports 80,443,8080
iptables -A FORWARD -d 10.10.10.5-p tcp -m multiport --ports 80,443,8080
....
iptables -A FORWARD -d 10.10.10.254 -p tcp -m multiport --ports 80,443,8080
and
iptables -t nat -A PREROUTING -d 10.10.10.1 -p tcp -j DNAT --to-destination
192.168.0.1
iptables -t nat -A PREROUTING -d 10.10.10.2 -p tcp -j DNAT --to-destination
192.168.0.2
iptables -t nat -A PREROUTING -d 10.10.10.3 -p tcp -j DNAT --to-destination
192.168.0.3
...
iptables -t nat -A PREROUTING -d 10.10.10.254 -p tcp -j DNAT
--to-destination 192.168.0.254
Case 2)
iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
and
iptables -t nat -A PREROUTING -d 10.10.10.1 -p tcp -m multiport --dports 80
443,8080 -j DNAT --to-destination 192.168.0.1
iptables -t nat -A PREROUTING -d 10.10.10.2-p tcp -m multiport --dports 80
443,8080 -j DNAT --to-destination 192.168.0.2
iptables -t nat -A PREROUTING -d 10.10.10.3-p tcp -m multiport --dports 80
443,8080 -j DNAT --to-destination 192.168.0.3
...
iptables -t nat -A PREROUTING -d 10.10.10.254 -p tcp -m multiport --dports
80,443,8080 -j DNAT --to-destination 192.168.0.254
I think both cases give the same result: only port 80, 443 and 8080 are
allowed en natted to the corresponding server.
I know the firewall isn't closed, but I'm only interessed in the performance
The ip-addresses are fictional and will in the real world not follow up.
It's just to demonstrate the 2 cases.
Which of the 2 cases will give the best performance and why? Is one of them
giving some overhead and why?
Thanks in advance,
Wouter
reply other threads:[~2002-12-03 21:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=3DED256E.000009.01744@yoda \
--to=wouter.coppens@pandora.be \
--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