Browse Source

use a variable $ext_addr instead of the hard-coded 192.168.1.1. this

will make it easier for testing (just run hoststated -Dext_addr=X.X.X.X).
OPENBSD_4_1
reyk 17 years ago
parent
commit
cfb92608a7
2 changed files with 8 additions and 6 deletions
  1. +4
    -3
      src/etc/hoststated.conf
  2. +4
    -3
      src/etc/relayd.conf

+ 4
- 3
src/etc/hoststated.conf View File

@ -1,7 +1,8 @@
# $OpenBSD: hoststated.conf,v 1.5 2007/02/26 19:25:25 reyk Exp $
# $OpenBSD: hoststated.conf,v 1.6 2007/02/26 20:43:32 reyk Exp $
#
# Macros
#
ext_addr="192.168.1.1"
webhost1="10.0.0.1"
webhost2="10.0.0.2"
@ -32,7 +33,7 @@ table fallback {
# Services will be mapped to a rdr rule.
#
service www {
virtual host 192.168.1.1 port http interface trunk0
virtual host $ext_addr port http interface trunk0
# tag every packet that goes thru the rdr rule with HOSTSTATED
tag HOSTSTATED
@ -59,7 +60,7 @@ protocol httpssl {
relay wwwssl {
# Run as a SSL accelerator
listen on 192.168.1.1 port 443 ssl
listen on $ext_addr port 443 ssl
protocol httpssl
# Forward to hosts in the webhosts table using a src/dst hash


+ 4
- 3
src/etc/relayd.conf View File

@ -1,7 +1,8 @@
# $OpenBSD: relayd.conf,v 1.5 2007/02/26 19:25:25 reyk Exp $
# $OpenBSD: relayd.conf,v 1.6 2007/02/26 20:43:32 reyk Exp $
#
# Macros
#
ext_addr="192.168.1.1"
webhost1="10.0.0.1"
webhost2="10.0.0.2"
@ -32,7 +33,7 @@ table fallback {
# Services will be mapped to a rdr rule.
#
service www {
virtual host 192.168.1.1 port http interface trunk0
virtual host $ext_addr port http interface trunk0
# tag every packet that goes thru the rdr rule with HOSTSTATED
tag HOSTSTATED
@ -59,7 +60,7 @@ protocol httpssl {
relay wwwssl {
# Run as a SSL accelerator
listen on 192.168.1.1 port 443 ssl
listen on $ext_addr port 443 ssl
protocol httpssl
# Forward to hosts in the webhosts table using a src/dst hash


Loading…
Cancel
Save