From mboxrd@z Thu Jan 1 00:00:00 1970 From: "AJ Mayor" Subject: DNAT & Redirects Date: Tue, 19 Nov 2002 16:40:21 -0500 Sender: netfilter-admin@lists.netfilter.org Message-ID: <000f01c29014$430b39b0$8bb5a8c0@ajbox> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000C_01C28FEA.5A0F0C10" Return-path: Errors-To: netfilter-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: To: netfilter@lists.netfilter.org This is a multi-part message in MIME format. ------=_NextPart_000_000C_01C28FEA.5A0F0C10 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello All, Im trying (unsuccessfully thus far) to do the following. Redirect all port 80 http traffic coming from subnet 172.16.100.0/24 to = 172.16.200.5:80 The idea being that all people on the 172.16.100.0 subnet are suspended = from surfing the net and that any http request they make will bring them = to a default webpage on the server saying something to the effect of pls = call our office to activate your account blah blah blah here is what I have tried and failed with so far; iptables -t nat -A PREROUTING -p tcp -s 172.16.100.0/24 -d 0/0 -dport 80 = -j DNAT --to 172.16.200.5:80 i know im overlooking something but what i dont know, any idea on this = one?? AJ ------=_NextPart_000_000C_01C28FEA.5A0F0C10 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hello All,
 
Im trying (unsuccessfully thus far) to = do the=20 following.
 
Redirect all port 80 http traffic = coming from=20 subnet 172.16.100.0/24 to 172.16.200.5:80
 
The idea being that all people on the = 172.16.100.0=20 subnet are suspended from surfing the net and that any http request they = make=20 will bring them to a default webpage on the server saying something to = the=20 effect of pls call our office to activate your account blah blah=20 blah
 
here is what I have tried and failed = with so=20 far;
 
iptables -t nat -A PREROUTING -p tcp -s = 172.16.100.0/24 -d 0/0 -dport 80 -j DNAT --to = 172.16.200.5:80
 
i know im overlooking something but = what i dont=20 know, any idea on this one??
 
AJ
------=_NextPart_000_000C_01C28FEA.5A0F0C10--