From: Jason Opperisano <opie@817west.com>
To: netfilter@lists.netfilter.org
Subject: Re: iptables script and ports to access intranet from internet..
Date: Thu, 16 Dec 2004 08:14:34 -0500 [thread overview]
Message-ID: <20041216131434.GA22631@bender.817west.com> (raw)
In-Reply-To: <006601c4e27e$2d75fb80$0400a8c0@beta03>
On Wed, Dec 15, 2004 at 05:15:02AM -0300, Guillermo Javier Nardoni
wrote:
> iptables -t nat -A PREROUTING -p TCP --dport 80 -j REDIRECT --to-port
> 3128
this is your problem. if your intent is to redirect internal users to a
transparent proxy--specify the internal interface:
iptables -t nat -A PREROUTING -i $IF_LAN -p TCP --dport 80 \
-j REDIRECT --to-port 3128
without specifying the internal interface--your external port 80
requests will be redirected to the proxy as well (this may or may not be
what you want--sounds like it's not).
> #iptables -A INPUT -p tcp --dport 80 -i $IF_WLAN -j AACEPT
fix the typo and uncomment that to allow access to port 80 on the
firewall from the outside:
iptables -A INPUT -p tcp --dport 80 -i $IF_WLAN -j ACCEPT
> iptables -A INPUT -i ppp0 -j ACCEPT
you really think that's a good idea?
> iptables -A INPUT -p tcp --dport 22 -j ACCEPT
>
> iptables -A INPUT -p tcp --dport 21 -j ACCEPT
>
> iptables -A INPUT -p tcp --dport 23 -j ACCEPT
>
> iptables -A INPUT -p tcp --dport 80 -j ACCEPT
a lot of this seems repetitive...
> echo " Logging & Dropping..."
>
> iptables -A INPUT -p tcp -j LOG -m limit --log-prefix "FILTER
> TCP-BAD-IN:"
>
> iptables -A INPUT -p tcp -j DROP
>
> iptables -A INPUT -p udp -j LOG -m limit --log-prefix "FILTER
> UDP-BAD-IN:"
>
> iptables -A INPUT -p udp -j DROP
>
> iptables -A INPUT -j LOG -m limit --log-prefix "FILTER
> UNKNOWN-BAD-IN:"
>
> iptables -A INPUT -j DROP
since you've already accepted everything--you won't be doing much
dropping here...
-j
--
"Call this an unfair generalization if you must, but old people are
no good at everything."
--The Simpsons
prev parent reply other threads:[~2004-12-16 13:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-15 8:15 iptables script and ports to access intranet from internet Guillermo Javier Nardoni
2004-12-16 13:14 ` Jason Opperisano [this message]
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=20041216131434.GA22631@bender.817west.com \
--to=opie@817west.com \
--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