View Single Post
  #2   (View Single Post)  
Old 25th January 2009
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

Quote:
Originally Posted by Quaxo View Post
I can connect to the server (ie. my router) via WLAN with DHCP without any problem, but when I try to read a web page nothing happens.
Before examining PF rules in detail, check first to see if sysctl net.inet.ip.forwarding is set to 1. IPv4 packets will not be routed without this.
Quote:
Should this PF-rule work for me?
It looks fine, except that the "pass" may not do what you expect it to, and there may be additional filter rules needed. The NAT section of the PF User's Guide reminds us (highlight mine):
...since translation occurs before filtering, the filter engine will see the translated packet with the translated IP address and port...
Quote:
In order to do this NAT, is it required to also create a bridge?
No.
Quote:
Should the domain-name-servers setting in dhcpd.conf point to my DNS given by my ISP?
This is unrelated to NAT. You will want to provide DHCP users with the appropriate configuration. At minimum, this is an IP address, a netmask, a default route. While DNS servers may be optional in a private network with no Internet access, they aren't optional for Internet use.

I strongly recommend you add the log keyword to every PF rule that permits it, so that you can see exactly what rules pass and block. You do this with tcpdump(8) and the pflog(4) pseudo device.

Last edited by jggimi; 25th January 2009 at 05:31 PM.
Reply With Quote