* RE: upgrade to iptabels from ipchains
@ 2003-05-27 23:11 George Vieira
2003-05-28 14:22 ` Esteban
0 siblings, 1 reply; 5+ messages in thread
From: George Vieira @ 2003-05-27 23:11 UTC (permalink / raw)
To: Esteban, netfilter
Yes you can? You haven't reasearch much have you?
Do this...
IPCHAINS="/sbin/iptables" # ;)
Just remember that iptables structure is different to ipchains in that INPUT is no longer part of the forwarding line.. it handles packets destined for itself ONLY..
Thanks,
____________________________________________
George Vieira
Systems Manager
georgev@citadelcomputer.com.au
Citadel Computer Systems Pty Ltd
http://www.citadelcomputer.com.au
-----Original Message-----
From: Esteban [mailto:eribicic@sinectis.com]
Sent: Wednesday, May 28, 2003 8:02 AM
To: netfilter@lists.netfilter.org
Subject: upgrade to iptabels from ipchains
i used to have this:
$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
how can i do this with iptables?
the idea is to use chains for each group.
thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: upgrade to iptabels from ipchains
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
0 siblings, 1 reply; 5+ messages in thread
From: Esteban @ 2003-05-28 14:22 UTC (permalink / raw)
To: George Vieira; +Cc: netfilter
$IPCHAINS -A soporte -s 10.0.1.1 -j MASQUERADE
$IPCHAINS -A soporte -j DENY
this rules does not work!
(the second should be DROP, but what about the first one?)
thanks!
On Tue, 2003-05-27 at 20:11, George Vieira wrote:
> Yes you can? You haven't reasearch much have you?
>
> Do this...
>
> IPCHAINS="/sbin/iptables" # ;)
>
> Just remember that iptables structure is different to ipchains in that INPUT is no longer part of the forwarding line.. it handles packets destined for itself ONLY..
>
> Thanks,
> ____________________________________________
>
> -----Original Message-----
> From: Esteban [mailto:eribicic@sinectis.com]
> Sent: Wednesday, May 28, 2003 8:02 AM
> To: netfilter@lists.netfilter.org
> Subject: upgrade to iptabels from ipchains
>
>
> i used to have this:
>
> $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
>
> how can i do this with iptables?
> the idea is to use chains for each group.
>
> thanks!
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: upgrade to iptabels from ipchains
2003-05-28 14:22 ` Esteban
@ 2003-05-28 16:05 ` Leonardo Rodrigues Magalhães
0 siblings, 0 replies; 5+ messages in thread
From: Leonardo Rodrigues Magalhães @ 2003-05-28 16:05 UTC (permalink / raw)
To: Esteban, netfilter ML
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: upgrade to iptabels from ipchains
@ 2003-05-28 18:31 John Friel III
0 siblings, 0 replies; 5+ messages in thread
From: John Friel III @ 2003-05-28 18:31 UTC (permalink / raw)
To: 'netfilter@lists.samba.org'
Cc: 'Leonardo Rodrigues Magalhães'
> 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
And it should be noted that with these rules in place, all packets that get
forwarded to the soporte chain will get DROPPED because the forward rule
only forwards IP's in the range of 10.0.0.0-10.0.0.127 and the accept range
is restricted to -only- IP 10.0.1.1.
The 4th rule should be:
iptables -A FORWARD -s 10.0.0.0/16 -j soporte
Cheers!
John Friel III
Frieltek Consulting, Inc.
^ permalink raw reply [flat|nested] 5+ messages in thread
* upgrade to iptabels from ipchains
@ 2003-05-27 22:02 Esteban
0 siblings, 0 replies; 5+ messages in thread
From: Esteban @ 2003-05-27 22:02 UTC (permalink / raw)
To: netfilter
i used to have this:
$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
how can i do this with iptables?
the idea is to use chains for each group.
thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-05-28 18:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
-- strict thread matches above, loose matches on Subject: below --
2003-05-28 18:31 John Friel III
2003-05-27 22:02 Esteban
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox