Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "Leonardo Rodrigues Magalhães" <leolistas@solucoesip.net>
To: Esteban <eribicic@sinectis.com>,
	netfilter ML <netfilter@lists.samba.org>
Subject: Re: upgrade to iptabels from ipchains
Date: Wed, 28 May 2003 13:05:51 -0300	[thread overview]
Message-ID: <001a01c32533$03ad3a70$8a01a8c0@ESTACAO> (raw)
In-Reply-To: 1054131723.21086.4.camel@dejawu


    This set of ipchains rules:

$IPCHAINS -N soporte
$IPCHAINS -A FORWARD -s 10.0.0.0/25  -j soporte
$IPCHAINS -A soporte -s 10.0.1.1 -j MASQUERADE
$IPCHAINS -A soporte -j DENY

    would became this in iptables

iptables -N soporte
iptables -A soporte -s 10.0.1.1 -j ACCEPT
iptables -A soporte -j DROP
iptables -A FORWARD -s 10.0.0.0/25 -j soporte
iptables -t nat -A POSTROUTING -s 10.0.1.1 -j MASQUERADE


    Some explanations

    In ipchains, the decision to allow or not forwarding was done in forward
rule, as well as the decision of forward it with the original address or NAT
it. This has changed in iptables. FORWARD rule only take the decision of
allowing or not the forwarding of the packet. NAT is done in POSTROUTING
rule of nat table. You should also note that when you do not specify which
table, you're working with filter table. So 'iptables -N soporte' and
'iptables -t filter -N soporte' would do exactly the same thing.


    Well, hope this helps ....

    Sincerily,
    Leonardo Rodrigues



  reply	other threads:[~2003-05-28 16:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-27 23:11 upgrade to iptabels from ipchains George Vieira
2003-05-28 14:22 ` Esteban
2003-05-28 16:05   ` Leonardo Rodrigues Magalhães [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-05-28 18:31 John Friel III
2003-05-27 22:02 Esteban

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='001a01c32533$03ad3a70$8a01a8c0@ESTACAO' \
    --to=leolistas@solucoesip.net \
    --cc=eribicic@sinectis.com \
    --cc=netfilter@lists.samba.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