Re: Setup of jail bound to lo0

From: Sten Spans (sten_at_blinkenlights.nl)
Date: 03/21/05

  • Next message: Julian Elischer: "Re: Sending Ethernet frames"
    Date: Mon, 21 Mar 2005 23:17:59 +0100 (CET)
    To: Sławek Żak <slawek.zak@gmail.com>
    
    
    

    On Mon, 21 Mar 2005, [UTF-8] SÅ~Bawek Å»ak wrote:

    > On Wed, 16 Mar 2005 10:47:25 +0100 (CET), Sten Spans
    > <sten@blinkenlights.nl> wrote:
    >> On Wed, 16 Mar 2005, [UTF-8] SÅ~Bawek Å»ak wrote:
    >>
    >>> Hi,
    >>>
    >>
    >> pf:
    >>
    >> # Tables: similar to macros, but more flexible for many addresses.
    >> table <webservers> { 1.2.3.4, 5.6.7.8, 9.9.9.9 }
    >>
    >> # Translation: specify how addresses are to be mapped or redirected.
    >> nat on $ext_if from $loopback_addr to any -> ($ext_if)
    >>
    >> # rdr: packets coming in on $ext_if with destination <webservers>:80
    >> rdr on $ext_if proto tcp from any to <webservers> port 80 -> $loopback_addr port 80
    >
    > Hi,
    >
    > It sure works :)
    >
    > My rules are:
    >
    > ext_if="lnc0"
    > table <webservers> { 127.0.0.2, 127.0.0.3 }
    > nat on $ext_if from <webservers> to any -> ($ext_if)
    > rdr on $ext_if proto tcp from any to any port 80 -> 127.0.0.2 port 80
    >
    > I wasn't sure what you meant by $loopback_addr. I will add rules like
    > this for every server:
    >
    > rdr on $ext_if proto tcp from any to any port 81 -> 127.0.0.3 port 80

    My setup is a bit different. I have 1 jail
    with ip 10.0.0.1, and multiple external ips
    distributed with vrrp.

    internal_net="192.168.1.0/23"
    loopback_addr="10.0.0.1"

    table <webservers> { 1.2.3.21, 1.2.3.22, 1.2.3.23 }

    # Normalization: reassemble fragments and resolve or reduce traffic
    ambiguities.scrub in all

    # Translation: specify how addresses are to be mapped or redirected.
    nat on $ext_if from $loopback_addr to any -> ($ext_if)

    # rdr: packets coming in on $ext_if with destination <webservers>:80
    rdr on $ext_if proto tcp from any to <webservers> port 80 -> $loopback_addr port 80

    # block all packets from $loopback_addr on the internal interface
    block in on $lo_if from $loopback_addr to $internal_net

    > Nice thing this PF. I can't do this in IPFilter.

    pf is quite nice indeed.

    > Thank you very mach Sten!

    no problem.

    -- 
    Sten Spans
    "There is a crack in everything, that's how the light gets in."
    Leonard Cohen - Anthem
    
    

    _______________________________________________
    freebsd-net@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-net
    To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"


  • Next message: Julian Elischer: "Re: Sending Ethernet frames"

    Relevant Pages

    • Re: Print Spanish characters in Perl?
      ... and ensure that your file is saved in the UTF-8 format. ... encoding then your display device expects. ... forgetting to specify UTF-8 as charset. ... To avoid this kind of problem, make sure that all the characters are ...
      (comp.lang.perl.misc)
    • Re: Missing characters after file rewrite using File.OpenText
      ... you create your StreamReader. ... If your output file isn't meant to be UTF-8, you should specify the ... encoding when you create your StreamWriter. ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: [PHP] UTF-8 support
      ... Will trimwork if I specify charlists in the ASCII range? ... Any byte function is NOT safe for UTF-8. ... This is because all whitespace characters are in the ASCII range, and therefore it won't corrupt the UTF-8 string. ...
      (php.general)
    • Re: Newbie : tkMOO plugin
      ... > This may need a little tweaking after you specify more precisely ... What I need to work from is the UTF-8 ... I think I read that TCL stores strings internally ...
      (comp.lang.tcl)
    • Re: Print Spanish characters in Perl?
      ... be able to display the accented characters. ... I know that I need to specify ... saving as UTF-8, then including the text in an HTML page but forgetting ... ISO-Latin-1 and the non-ASCII characters will be messed up, ...
      (comp.lang.perl.misc)