Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Dean Hiller <olddean@xsoftware.biz>
To: netfilter@lists.netfilter.org
Subject: block 8080, but redirect from 80 to 8080
Date: Mon, 31 Jul 2006 22:11:11 -0600	[thread overview]
Message-ID: <44CED45F.10208@xsoftware.biz> (raw)

I would like block all traffic to port 8080 except that which was 
redirected in the nat table from port 80 to 8080. 

I have a default policy of DROP on incoming.  The following is what my 
iptables file currently has and this works, EXCEPT that 8080 is left 
open to anyone....

*nat table.....
-A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080

*filter table.....
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j 
ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 8080 
-j ACCEPT


but anyone can go to http://<machine>:8080 which I want to disallow.  
How can I fix that?
thanks,
dean


             reply	other threads:[~2006-08-01  4:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-01  4:11 Dean Hiller [this message]
2006-08-01 10:46 ` block 8080, but redirect from 80 to 8080 Pascal Hambourg
2006-08-01 11:42   ` Gáspár Lajos
2006-08-01 12:11     ` Pascal Hambourg
2006-08-01 11:54   ` Gáspár Lajos

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=44CED45F.10208@xsoftware.biz \
    --to=olddean@xsoftware.biz \
    --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