All pastes #988910 Raw Edit

hoststated.conf

public text v1 · immutable
#988910 ·published 2008-04-17 23:38 UTC
rendered paste body
#
ext_addr="64.15.66.18"
webhost1="209.44.112.66"
#webhost2="10.0.0.2"
fallback="209.44.112.87"

#
# Global Options
#
# interval 10
# timeout 200
# prefork 5
log all

#
# Each table will be mapped to a pf table.
#
table webhosts {
        real port http
        check http "/" code 302
        host $webhost1
        #host $webhost2
}

table fallback {
        real port http
        disable
        check icmp
        host $fallback
}

#
# Services will be mapped to a rdr rule.
#
service www {
        virtual host $ext_addr port http interface trunk0

        # tag every packet that goes thru the rdr rule with HOSTSTATED
        tag HOSTSTATED

        table webhosts
        backup table fallback
}