listen on <something> port <port> -- that means listening on localhost or its NIC, in your case all three listen will use probably your router external LAN NIC IP address. So yes, you will need to use different port numbers -- if you are not going to use one/two/three as load balancing hosts for the same app. In this case you will have one table with three hosts IPs and just one redirect.
IMHO! Also relayd beginner like you. On Thu, Nov 2, 2017 at 7:17 PM, Bryan C. Everly <br...@bceassociates.com> wrote: > 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 >