|
|||
pf rdr to hostname rather than ip
In my pf.conf I have lines like this
Code:
rdr on $ext_if proto tcp from any to ($ext_if) port 5060 -> asterisk One solution would be to go to static ips, but it's rather convenient to use dhcp and also makes pf.conf easy to read. How can this be solved? Can I delay pf in rc.d do make it run after dhcpd? If so, how and what side effects would that bring? This is on a FBSD 9.0-RELEASE-p3 machine. |
|
|||
Just assign a static IP through DHCP:
Code:
host static-client { hardware ethernet 00:18:dc:47:b0:4c ; fixed-address 192.168.223.20 ; }
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
Yes, that is my setup (but with dnsmasq). But during a reboot, pf doesn't know that. So the rules doesn't work.
|
|
|||
Because you assigned a fixed IP you can use that IP in your pf.conf
Code:
asterisk = 10.22.33.44 rdr on $ext_if proto tcp from any to ($ext_if) port 5060 -> $asterisk
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
Yes but it also means that I need to map asterisk to 10.22.33.44 in both dnsmasq.conf and pf.conf.
It seems that the easiest way to solve this would be to move dns to a different machine. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Setting hostname | Franciscus | NetBSD Installation and Upgrading | 4 | 4th December 2011 03:30 AM |
My domain name as my IRC hostname? | guitarscn | General software and network | 6 | 15th September 2010 02:43 PM |
Hostname problem, and others | gaeilgeboy | FreeBSD General | 3 | 7th July 2008 11:30 PM |
Hostname / web hosting issues | vitiate | FreeBSD General | 4 | 20th May 2008 02:23 PM |