From: "Cam Bazz" <cambazz@gmail.com>
To: netfilter <netfilter@vger.kernel.org>
Subject: iptables problem
Date: Fri, 5 Sep 2008 14:12:12 +0300 [thread overview]
Message-ID: <1bcb7c7f0809050412g67724c2dl3dfcfb2eb59749b@mail.gmail.com> (raw)
Hello
I am running a glassfish server and I need the basic requirement of
forwarding port 80 to port 8080. Here is what I have done: (I put
1.1.1.1 instead of my real ip adress.)
#
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT;
iptables -A INPUT --destination 1.1.1.1/32 -p tcp --dport 8080 -m
conntrack --ctstate DNAT -j ACCEPT;
iptables -t nat -A PREROUTING -d 1.1.1.1/32 -p tcp --dport 80 -j
REDIRECT --to-port 8080;
iptables -A INPUT -j DROP;
iptables -I INPUT 1 -i lo -j ACCEPT;
#
it works fine. but here is the problem. I added another ip address
with ip aliasing and now I got eth0:1.
I want to run apache on port 80 on this ip.
but no matter what I tried, I could not modify the rules so packets
coming to eth0:1 port80 do not go to port 8080 on eth0. currently all
packets routed to eth0:1 port80 goes to eth0 port 8080.
any ideas/recomendations/help greatly appreciated.
Best regards,
-C.B.
next reply other threads:[~2008-09-05 11:12 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-05 11:12 Cam Bazz [this message]
2008-09-05 12:39 ` iptables problem Matt Zagrabelny
2008-09-05 15:35 ` Grant Taylor
-- strict thread matches above, loose matches on Subject: below --
2007-10-06 16:28 IPtables problem Per Jørgensen
2007-10-06 18:25 ` Pascal Hambourg
2007-01-26 11:19 Iptables problem Saurabh Mehrotra
2007-01-26 13:53 ` Ted Phelps
2007-01-26 14:17 ` Saurabh Mehrotra
2007-01-26 15:17 ` Ted Phelps
2007-01-26 15:49 ` Saurabh Mehrotra
2007-01-26 15:55 ` Ted Phelps
2006-10-19 4:52 tarak
2005-11-08 17:08 IPTABLES PROBLEM Micol lupen
2005-11-08 18:56 ` Rob Sterenborg
2005-11-08 19:08 ` /dev/rob0
2005-11-01 18:06 iptables problem Ashley M. Kirchner
2005-11-02 0:31 ` Buddy wu
2004-08-25 20:04 Iptables problem Jason Opperisano
2004-08-25 19:52 Marcelo Sinhorini
2004-08-26 0:24 ` Jose Maria Lopez
2003-08-13 17:09 Glenn Hancock
2003-08-13 17:36 ` Rob Sterenborg
2003-05-14 11:45 IPTables problem Tech
2003-05-13 15:13 iptables problem hare ram
2003-05-13 17:02 ` Guilherme Viebig
2003-05-14 11:17 ` hare ram
2003-05-14 11:38 ` Bikrant Neupane
2003-03-13 9:57 Iptables problem De Jager Laubscher
2003-03-13 10:16 ` Maciej Soltysiak
2002-12-12 11:52 IPtables Problem Amit Kumar Gupta
2002-11-27 3:26 iptables problem 김도균
2003-01-17 5:32 ` Raymond Leach
2003-01-18 0:35 ` Diego Sarasua
2002-10-04 17:55 IPTables Problem Niel Harper
2002-06-25 11:55 Iptables problem Paulo Andre
2002-06-25 11:57 ` Ramin Alidousti
2002-06-25 10:47 Paulo Andre
2002-06-25 11:51 ` Ramin Alidousti
[not found] <CC845BB8BC74D6119934000347DD23E87C0C09@jhbmail.autopage.co.za>
2002-06-24 16:03 ` Antony Stone
[not found] <CC845BB8BC74D6119934000347DD23E87C0C07@jhbmail.autopage.co.za>
2002-06-24 14:26 ` Antony Stone
[not found] <CC845BB8BC74D6119934000347DD23E87C0C01@jhbmail.autopage.co.za>
2002-06-21 14:44 ` Antony Stone
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=1bcb7c7f0809050412g67724c2dl3dfcfb2eb59749b@mail.gmail.com \
--to=cambazz@gmail.com \
--cc=netfilter@vger.kernel.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