Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Song Du <freewizard@gmail.com>
To: Phani Kumar <pkumar@students.iiit.net>
Cc: netfilter@lists.netfilter.org
Subject: Re: redirect unauthenticated traffic to a registration portal
Date: Wed, 8 Jun 2005 14:25:09 +0800	[thread overview]
Message-ID: <49ba2808050607232518af48e9@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0506061504430.23665@students.iiit.ac.in>

just like transparent proxy
assume http://AUTH_PORTAL_IP is where user can type password and become authed.
iptables -t nat -A PREROUTING CONDITIONS_TO_MATCH_AUTHED -j ACCEPT
iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to AUTH_PORTAL_IP
iptables -t nat -A PREROUTING -j DROP


2005/6/6, Phani Kumar <pkumar@students.iiit.net>:
> Hi,
>    I have implemented a linux router with 4 interfaces.
> 
> eth0 -- outside net
> eth1 --
> eth2 --    diff Internal n/ws
> eth3 --
> 
> Now I had to allow only authenticated traffic to pass through the
> router(i.e through interface eth0).
> I have a list of all authenticated Mac-addresses in a file.
> 
> All unauthenticated traffic (i.e non-authenticated mac-address traffic)
> had to be redirected to default registration site.
> 
> Pls can anyone suggest me how to do above task.
> I am able to allow only authenticated traffic by using
> 
> iptables -t filter -A FORWARD -m --mac-source xx.xx.xx... -i eth0 -j
> ACCEPT
> 
> and so on for all authenticated users
> 
> iptables -t filter -A FORWARD -i eth0 -j DROP
> 
> How do I redirect the unathenticated traffic to a registration portal
> rather than dropping it??
> 
> Phani
> IIIT-Hyd
> 
> 


-- 
freewizard (at) gmail.com 
http://blog.tsing.org/freewizard/   (in Chinese)


      reply	other threads:[~2005-06-08  6:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-06  9:47 redirect unauthenticated traffic to a registration portal Phani Kumar
2005-06-08  6:25 ` Song Du [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=49ba2808050607232518af48e9@mail.gmail.com \
    --to=freewizard@gmail.com \
    --cc=netfilter@lists.netfilter.org \
    --cc=pkumar@students.iiit.net \
    /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