Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Dec 2008 15:40:37 +0100
From:      "Leander S." <leander.schaefer@gmx.net>
To:        freebsd-ipfw@freebsd.org
Subject:   ===== Port/Traffic Redirection =====
Message-ID:  <494BB265.4070201@gmx.net>

next in thread | raw e-mail | index | archive | help
Hi,

I'm trying to get a captive portal- / transparent proxy- like attitude 
on my IPFW traffic. I actually want to divert all http traffic to the 
webserver on the same IPFW diverting machine.
I tried rules like that but I sadly never got it working.



SERVERSIDE: my Apache webserver is listening on port 8080 AND also 80.
CLIENTSIDE: I'm guessing my clients http requests on port 80 as well as 
8080 and 443

###############################################################################################
###############################################################################################

        ### HTTP Traffic forwarding to Apache:8080
        ${fwcmd} add 21200 allow tcp from any to ${LAN_IP} 80,443,8080 
in via ${LAN_if}
        ${fwcmd} add 21300 allow tcp from any to ${LAN_IP} 80,443,8080 
out via ${LAN_if}
        ${fwcmd} add 21400 fwd ${LAN_IP},8080 tcp from ${LAN} to me 
80,443,8080 setup in via ${LAN_if} keep-state

        ### Package Detour
        ${fwcmd} add 21500 allow all from any to any out via ${LAN_if}

###############################################################################################
###############################################################################################

^^ Btw. my IPFW denies packages by default.
^^ I'm not quite sure if those make sense at all?!



Thanks,


    Leander















Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?494BB265.4070201>