Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to setup forwarding on gateway machine with following request from client: Is it possible to setup pf.conf on OpenBSD 4.5 machine, but instead IP address to have given URL such as

I already done settings of port forwarding with IP address. Here it is:

rdr on $ext_if proto tcp from any to $ext_if port 9090 ->

Above is Redirection section. And in Filter Rules:

pass in quick on $ext_if inet proto tcp from any to port 9090

This a gateway machine where I only can set port forwarding.

Please, could someone help me - is it possible or not. I read about it, but nowhere found example of souch settings.

share|improve this question
Instead of IP addresses you can put DNS names to pf.conf, too. Those will be resolved once when pf reads its rules. Is that what you want? – Janne Pikkarainen May 15 '12 at 13:32
Yes, that was the initial idea. Thank you very much. I will test it – Zoran May 16 '12 at 5:33
@JannePikkarainen can you record the answer so the question can be closed? Also note that the DNS lookup only occurs once when the rules are loaded. – Liczyrzepa Jul 10 '15 at 19:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.