Re: Howto capture first connection and redirect ???

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Francisco Morales wrote:
Hello, I would like to know if does it possible to capture just the
first connection og one user with a iptables rule and redirect to a
specific ip/port address.

I have a intranet with a proxy machine with squid on debian for to out
to internet, and I would like that when I user connect for first time,
a iptable rule redirect it to a welcome page.... but just the first
time ..

Does it possible to do this with a iptable rule??

Thanks a lot
-
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

This is probably possible with the recent match. Somthing along these lines (untested!):

-t mangle -A PREROUTING -p tcp -dport 80 ! -m recent --update --seconds 3600 -j REDIRECT --to <welcome-page>

HTH,
M4

-
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux