Hi misc@,

I have a use case where I'm using OpenBSD 6.2 as my router/firewall
and there are several websites that sit behind it on separate servers
(let's call them http://one.com, http://two.com and http://three.com

I'd like to be able to have just a single IP address exposed through
DNS for all three of them (it's a home cablemodem and I only have one
public IP address) and then use something on OpenBSD (pf?  relayd?) to
route the traffic to the appropriate private IP address on the LAN
side of the network.

In looking at the manpage for relayd and relayd.conf, I'm wondering if
I could set up a relay using something like this:

table <one>  { 192.168.1.2 }
table <two> { 192.168.1.3 }
table <three> { 192.168.1.4 }

redirect "one" {
    listen on one.com port 80
    forward to <one>
}

redirect "two" {
    listen on two.com port 80
    forward to <two>
}

redirect "three" {
    listen on three.com port 80
    forward to <three>
}

I've tried this and even after re-reading the manpage and seeing that
I needed to add the "anchor" bit to my pf.conf I'm still not getting
what I'm looking for.  Perhaps I'm using the wrong tool for the job?

Thanks in advance for any suggestions or knocks on the head!

Thanks,
Bryan

Reply via email to