From: Marcello Scacchetti <marcello.scacchetti@nextrem.it>
To: netfilter@lists.netfilter.org
Subject: Re: Filter by IP address problems
Date: 11 Dec 2002 22:04:24 +0100 [thread overview]
Message-ID: <1039640664.25014.8.camel@nxitmirms1> (raw)
In-Reply-To: <1039642859.4340.14.camel@damon.betcolan>
Hi Damon,
can you post on this list the output of:
iptables -nL
and of:
iptables -t nat -nL
and if possible the output of:
ifconfig
hiding public ip addresses?
If you prefer you can use output of iptables-save for me is the same.
Thanks,
Marcello
Il mer, 2002-12-11 alle 22:40, Damon Brinkley ha scritto:
> Hey everyone! I'm getting extremely frustrated at iptables right now
> because it doesn't seem to follow the rules as ipchains did. Basically
> I'm just trying to replace my ipchains server with a new computer that
> uses 2.4 and iptables. This is a NAT/gateway machine and we filter our
> users by IP addresses. The different ip blocks have certain access to
> certain services. I've copied over my old script that's running right
> now and changed everything to work with iptables but it doesn't seem to
> deny anyone.
>
> Here's the basic rules I have right now for testing.
>
> ###################################
>
> # disable ip forwarding while rules are applied
> echo 0 > /proc/sys/net/ipv4/ip_forward
>
> /sbin/modprobe iptable_nat
> /sbin/modprobe ip_conntrack
>
> /sbin/iptables -F
> /sbin/iptables -t nat -F
> /sbin/iptables -X
> /sbin/iptables -t nat -X
>
> /sbin/iptables -P INPUT DROP
> /sbin/iptables -P OUTPUT DROP
> /sbin/iptables -P FORWARD DROP
>
> # no access
> /sbin/iptables -A INPUT -s 172.17.0.0/20 -j DROP
>
> # NAT
> /sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
> /sbin/iptables -A FORWARD -j ACCEPT
>
> # turn on ip forwarding
> echo 1 > /proc/sys/net/ipv4/ip_forward
>
> ####################
>
> If I change my laptop IP to 172.17.0.244 then I'm able to ping
> www.yahoo.com when the no access rule should deny then from doing
> anything. This is all working on a machine that uses ipchains...what am
> I doing wrong?
>
> Thanks
> Damon Brinkley
--
Marcello Scacchetti <marcello.scacchetti@nextrem.it>
next prev parent reply other threads:[~2002-12-11 21:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-11 21:40 Filter by IP address problems Damon Brinkley
2002-12-11 21:04 ` Marcello Scacchetti [this message]
2002-12-11 23:26 ` Stewart Thompson
2002-12-12 14:13 ` Damon Brinkley
2002-12-12 14:39 ` Joel Newkirk
2002-12-12 15:16 ` Damon Brinkley
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=1039640664.25014.8.camel@nxitmirms1 \
--to=marcello.scacchetti@nextrem.it \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.