Re: hoststated, using the same tables for more than one service

2007-09-25 Thread Pierre-Yves Ritschard
On Tue, 25 Sep 2007 14:08:50 +0200
Pierre-Yves Ritschard <[EMAIL PROTECTED]> wrote:

> On Tue, 25 Sep 2007 23:25:44 +1200
> Josh <[EMAIL PROTECTED]> wrote:
> 
> >  Well after trying it, it appears there _IS_ a problem there. One of
> > the services was not
> > working. As soon as I gave it its own separate tables, it worked.
> > 
> > Pierre-Yves Ritschard wrote:
> > 
> > Anyway, my question is, can I use the same tables in multiple
> > service entries? ( one for each connection )
> > 
> >   no problem there.
> > 
> the following works:
> 
After checking again, there seems to be a problem here indeed. I'll get
working on a solution.



Re: hoststated, using the same tables for more than one service

2007-09-25 Thread Pierre-Yves Ritschard
On Tue, 25 Sep 2007 23:25:44 +1200
Josh <[EMAIL PROTECTED]> wrote:

>  Well after trying it, it appears there _IS_ a problem there. One of
> the services was not
> working. As soon as I gave it its own separate tables, it worked.
> 
> Pierre-Yves Ritschard wrote:
> 
> Anyway, my question is, can I use the same tables in multiple
> service entries? ( one for each connection )
> 
>   no problem there.
> 
the following works:

webhost1=a.b.c.d
webhost2=e.f.g.h
public1=w.x.y.z
public2=w.x.y.z

table web1 {
real port http
check http "/" code 200
host $webhost1
}

table web2 {
real port http
check http "/" code 200
host $webhost2
}

table sorry {
check icmp
real port http
host 127.0.0.1
}

service www1 {
virtual host $public1 port 80
table web1
backup table sorry
}

service www2 {
virtual host $public2 port 80
table web2
backup table sorry
}



Re: hoststated, using the same tables for more than one service

2007-09-25 Thread Josh
 Well after trying it, it appears there _IS_ a problem there. One of the
services was not
working. As soon as I gave it its own separate tables, it worked.

Pierre-Yves Ritschard wrote:

Anyway, my question is, can I use the same tables in multiple service 
entries? ( one for each connection )

  no problem there.



Re: hoststated, using the same tables for more than one service

2007-09-25 Thread Pierre-Yves Ritschard
> Anyway, my question is, can I use the same tables in multiple service 
> entries? ( one for each connection )
> 

no problem there.



hoststated, using the same tables for more than one service

2007-09-25 Thread Josh

Hello there.

I am using hoststated to fail over to a backup server. No dramas in that 
department.


However, I have more than one internet connection for which hoststated 
is doing rdr's for. Each incoming internet connection goes to a specific 
carp ip, and I tag it. Then I use a reply-to later on to tell it which 
gateway to reply back to (instead of going out the default route).


so the network looks like this:

conn1 -> conn1_firewall -> hoststated_firewall(carp1) -> server
conn2 -> conn2_firewall -> hoststated_firewall(carp2) -> server
conn3 -> conn3_firewall -> hoststated_firewall(carp3) -> server


Anyway, my question is, can I use the same tables in multiple service 
entries? ( one for each connection )


Example:

# for internet connection one
service connection_one {
   virtual host 192.168.0.1 port 25
   tag route_one
   table main_server
   backup table backup_server
}

# for internet connection two
service connection_two {
   virtual host 192.168.0.2 port 25
   tag route_two
   table main_server
   backup table backup_server
}

and so on.

Can I do that without any weird side effects?

It will save me duplicating the table entry's for each different 
internet connection I get connections on.


Thanks,
   Josh