View Single Post
  #1   (View Single Post)  
Old 26th June 2008
d0z3r d0z3r is offline
New User
 
Join Date: Jun 2008
Posts: 2
Default relayd won't work with multiple relays

Hi all,

I'm running OpenBSD 4.3 with relayd enabled and configured.
I'm trying to configure 2 relays on 2 different machines, but this
configuration won't works!

Relayd starts fine and it finds all the hosts up, but i can connect to only one of these

This is the configuration:

#############
interval 10
prefork 5
ext_addr="10.200.1.2"

host1="192.168.4.10"
host2="192.168.4.24"

table <table_one> { $host1 }
table <table_two> { $host2 }

http protocol "one_web" {
request header expect "one.domain.tld" from "Host"
}
http protocol "two_web" {
request header expect "two.domain.tld" from "Host"
}

relay relay_one {
listen on $ext_addr port http
protocol "onw_web"
forward to <table_one> check tcp
}

relay relay_two {
listen on $ext_addr port http
protocol "two_web"
forward to <table_two> check tcp
}
#####################

Relayctl seems good:

# relayctl show summary
Id Type Name Avlblty Status
1 relay relay_two active
3 table table_two:80 active (1 hosts up)
3 host 192.168.4.24 100.00% up
0 relay relay_one active
2 table table_one:80 active (1 hosts up)
2 host 192.168.4.10 100.00% up

And in pf.conf i have:

rdr-anchor "relayd/*"
anchor "relayd/*"


So, one.domain.tld works perfectly, but if i try to call two.domain.tld,
relayd returns this:

relay relay_one, session 1 (1 active), 0, 192.168.0.240 -> :80,
incomplete request

If i switch "one" with "two", two starts to work and one go out of order

This is driving me crazy. Any suggestion? Any kind of help will be
really appreciated...
Reply With Quote