RDR with dynamic IP

Josh Finlay montarotech at optusnet.com.au
Mon Nov 28 13:30:33 GMT 2005


Here's the full scenario,

I'm running q3server (/usr/ports/games/q3server), bound to an external ip on iface ng0.. but LAN clients can't connect to it when its bound to an external iface (dont know why? had problems like this since i started using pf...)

By default it binds to localhost
So I need to at least tell it to bind to an ip (can't bind to multiple)
If I tell it bind to 192.168.0.x - internet clients can't get in
if I tell it to bind to 58.104.249.xx - lan clients can't get in

So what I want to do is bind it to 58.104.249.xx and then re-direct 192.168.0.x on port 27960, to 58.104.249.xx port 27960... but the problem is the 58.104.249.xx ip is dynamic, so how do I create a RDR rule that will be valid an interface rather than an IP?

ie.
rdr pass on $IntIF inet proto udp to port 27960 -> [the ip currently assigned to ng0 here] port 27960

any suggestions?
I'm hoping this is a total no-brainer ;)


More information about the freebsd-pf mailing list