From: Feizhou <feizhou@linuxmail.org>
To: ads nat <adsnat@yahoo.com>
Cc: netfilter@lists.netfilter.org
Subject: Re: IPTABLES routine help.
Date: Thu, 24 Jun 2004 11:32:09 +0800 [thread overview]
Message-ID: <40DA4B39.7070503@linuxmail.org> (raw)
In-Reply-To: <20040624030837.99693.qmail@web60404.mail.yahoo.com>
>
> I am DNATing LAN user by "iptables -t nat -A
> PREROUTING -s 192.168.0.0/24 -i eth1 -p tcp -m tcp
> --dport 80 -j DNAT --to-destination 10.0.0.2:80".
>
> Problem :
> whenever LAN user wish to acces internet he is
> forcebly taken to "index.htm" at 10.0.0.2:80. I have
> click link on index.htm to "www.google.com". Even when
> I clicks on link on "index.htm" page, it goes to
> index.htm page only.
> I tried putting "-m state NEW", thinking only when
> packet state is new it will take to "index.htm" and
> when user click on the link on "index.htm" page it
> will divert them to linked page. But this does not
> happen.
Of course it does not. You have already decided the destination when you
used DNAT. So no matter what ip the destination (the ip for
www.google.com or whatever) they will all go to 10.0.0.2 because that is
what DNAT DOES. Please go read up on the Netfilter howto and understand
what DNAT does.
>
> Please guide me to rule which will take user to
> index.htm page at 10.0.0.2:80 only at first time. When
> user click link on index.htm page destined for some
> other page(www.google.com) It should allow user to go
> to google or whatever.
What are you trying to achieve?
>
> If it is not possible by iptables, is there any
> technology by which i can achieve this.
> Thanks for support.
What are you trying to achieve?
prev parent reply other threads:[~2004-06-24 3:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-24 3:08 IPTABLES routine help ads nat
2004-06-24 3:32 ` Feizhou [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=40DA4B39.7070503@linuxmail.org \
--to=feizhou@linuxmail.org \
--cc=adsnat@yahoo.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 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.