pf is the OpenBSD Packet Filter, a feature-rich IP-layer firewall used on FreeBSD, NetBSD, and Mac OS X, as well as in the pfSense open-source firewall appliance software.

learn more… | top users | synonyms

0
votes
1answer
1k views

port forwarding with pf on Mac OS 10.9

I have to setup a port forwarding on Mac Os 10.9. The mac is connected to a OpenVPN, and I need to get access to another machine on the private network of the mac through that VPN. Apparently, Mac OS ...
0
votes
0answers
6 views

Redirecting traffic to a specific address and port using PF on MacOS

I want to pentest a mobile application. To do so, I want to intercept all WiFi traffic and forward it to Burp, which runs in a VM. I enabled "Internet Sharing" on my Macbook so my phone now connects ...
0
votes
1answer
1k views

pf - redirect rule does not work

I'm using pf on FreeBSD 9. sshd is up and listening on loopback only (127.0.0.1). Trying to use redirect rule to allow network hosts to connect via ssh. set block-policy drop set skip on lo0 scrub ...
2
votes
1answer
48 views

Can't access server on loopback address, only on private address

I am running a rails web app server bound to 0.0.0.0 on port 80 like so: sudo rails s --port=80 --bind=0.0.0.0 I can access it at my private address http://192.168.0.13/, normally I can access at ...
3
votes
1answer
3k views

OS X 10.8: redirecting locally initiated ssh connections to localhost:22

I need to hack the OS X pf to redirect all ssh connections from an user to this machine. I want, when doing $ ssh google.com to get the same results as with $ ssh localhost ie a connection to ...
3
votes
1answer
4k views

Enabling pf for transparent proxy on Mac OS X Mountain Lion

I'm doing some usability testing of a web application and am attempting to debug and record some SSL sessions using mitmproxy as a transparent proxy and for some reason pf under Mac OS X Mountain Lion ...
1
vote
0answers
38 views

Need to restart PF under OSX till it gets effective

is anybody here familiar with the use of PF under OSX? I'm using PF in order to force all the traffic on my MacBook going thru a VPN. In order to do so, I'm using the following pf.conf: wifi=en0 ...
0
votes
1answer
186 views

DNS lookup to localhost gives network error

I am running a recursive DNS server on Unbound in a jail on FreeBSD with pf as a firewall. Running drill @xxx.xxx.xxx.xxx example.com (where xxx.xxx.xxx.xxx is the servers IP) on my local machine ...
1
vote
0answers
83 views

Using PF under OSX but skipping local interface

I'm using PF under OSX to force the OS the make all external connections via a VPN to Ipredator. However, as soon as I start PF all local connections are blocked even though I thought I told PF to ...
1
vote
2answers
3k views

OpenBSD pf 'match in all scrub (no-df)' causes HTTPS to be unreachable on mobile network

First of all: excuse me for my poor usage of the English language. For several years I'm experiencing problems with the 'match in all scrub (no-df)' rule in pf. I can't find out what's happening here....
5
votes
1answer
987 views

pf (Mac OS X) rule to redirect all traffic to a specific ip/port

I'm trying to recreate this iptables setup (from https://github.com/darkk/redsocks) with pf: iptables -t nat -A REDSOCKS -p tcp -d 10.0.0.0/8 -j REDIRECT --to-ports 12345 iptables -t nat -A OUTPUT -p ...
2
votes
2answers
198 views

Layer 3 routing based on HTTP packet content

I'm running a HTTP proxy service and want to route traffic to various Layer 3 TUNs based on the contents of HTTP packets (e.g. HTTP headers). I'm using BSD and Linux to do this but it doesn't look ...
0
votes
1answer
69 views

Redirection of pfctl on OSX gets error

I want all my traffics are redirected to SOCKS proxy on 127.0.0.1:1080. I added the rule below to the end of /etc/pf.conf according to this tutorial: pass on en3 proto tcp from any to any rdr-to 127....
3
votes
0answers
208 views

pfSense Internal Traffic Policy Based Routing

What is the current and correct way to apply policy based routing to pfSense internal traffic (originating from the firewall itself)? Creating a floating rule with the WAN interfaces selected, ...
0
votes
1answer
1k views

traffic shaping on OSX 10.10 with pfctl and dnctl

I am trying to do traffic shaping (throttling) on Mac OS X 10.10 via pfctl and dnctl. I have implemented a simple test server and client with netcat (nc) and a synthetic random payload file to verify ...
1
vote
0answers
400 views

Openbsd 5.7: IPv6 advertisement not working

--context-- I have a Sokeris with 8 interfaces: em0 is connected to a bridge router (ISP) and em2 is connected to my DMZ network (web servers). I got from my ISP a /56 prefix and 2 DNS IPs but no ...
2
votes
1answer
306 views

pfSense can't access https website

I have just installed pfSense on a PC Engines APU1D4 to evaluate as an alternative to a Soekris 5501 + OpenBSD based setup, I have a PPPoE WAN configuration. The pf rules, NAT and PPPoE ...
-1
votes
1answer
141 views

pf firewall server configuration

I am trying to configure a fire wall for a server that host http, smtp and ssh on a custom port. When I initialize pf, I get an error at the command line: No ALTQ support in kernel and my ssh ...
0
votes
1answer
65 views

apache / mysql unable to connect jails with PF firewall

I have setup two jail environments on FreeBSD11 root@ns312773:/etc # jls JID IP Address Hostname Path 1 10.6.6.6 www /usr/jails/...
0
votes
0answers
77 views

Openbsd set connect on PPTP server behind packet filter

I have firewall on OpenBSD use Packet Filter and behind him MS Windows server with PPTP server. I need allow connect this PPTP server from internet. I set in OpenBSD: net.inet.gre.allow=1 net.inet....
0
votes
1answer
3k views

freebsd pf squid transparent

I have broken my brain dealing with this. Squid was built from ports /usr/ports/www/squid32 with PF_TP enabled. I have internet but strangely it bypasses squid. Obviously, squid logs are empty. I ...
3
votes
0answers
206 views

How to split traffic through two different network adapters based on TCP port in OS X

I have a scenario where we will be using a Mac to stream video content to an RTMP server. This RMTP service provides 2 ingest URLs so that you can upload the same video content twice and have ...
1
vote
1answer
685 views

Command to set dscp / ToS value on outgoing packets for OS X Mavericks?

I want to set a certain DSCP (or ToS) value on all packets sent over port 22. I have an iptables command to do so, but Mavericks only has the equivalent of pfctl and I can't figure out how to ...
4
votes
1answer
162 views

PF vs -m of iptables

As you know, iptables has -m (match) such as : -m string -m state -m -iplimit and so on... My question: Does PF has similar features such as -m of iptables?
0
votes
0answers
13 views

FreeBSD pf does not allow inbound smtp [duplicate]

I'm trying to figure out why the following simple pf config allows inbound SSH but not smtp (tcp 25). I'm running FreeBSD 10.1-RELEASE-p9, and the SMTP server is postfix 2.11.4. # -------------------...
1
vote
1answer
953 views

openbsd pf squid transparent proxy using a bridge

I want to use OpenBSD 5.7 as a filtering bridge in front of my router, and as part of that run a transparent proxy (squid 3.5.1) to manage web access. I have set up the openbsd machine as a bridge, ...
8
votes
4answers
2k views

OpenBSD/FreeBSD Firewall w/ GUI that is compatible with Intel 82574L Gigabit LAN NICs

I recently purchased a server to run m0n0wall or pfSense but I've learned since then that both of these firewall products are based on versions of FreeBSD which weren't yet compatible with the NICs in ...
1
vote
1answer
351 views

FreeBSD pf with NFS

I'm having trouble establishing new NFS connections when my pf is turned on. When I turn off pf on the server and client I'm able to mount with no trouble. I tried keep state and flags S/SA on the ...
3
votes
0answers
263 views

How to divert all OUTBOUND tcp traffic on port 1935 to localhost?

Mac OS X 10.10.3. I'm trying to use rtmpsrv. In order to do that, I have to redirect all outgoing tcp traffic on port 1935 to localhost. I tried: sudo sysctl -w net.inet.ip.forwarding=1 echo 'rdr ...
2
votes
3answers
688 views

How can one redirect to a new host all traffic destined for an old host?

We're moving a bunch of services, say from 1.2.3.4 to 5.6.7.8. In order to test that the new services are correctly configured, we'd like to redirect (to the new host) all traffic destined for the ...
2
votes
1answer
248 views

Is there an equivalent of LinuxIMQs in BSD?

Is there an equivalent of LinuxIMQs in BSD ? From linuximq.net: The imq device has two common usage cases: Ingress shaping: With linux only egress shaping is possible (except for the ingress ...
1
vote
2answers
804 views

How to block MAC address in pf firewall

I want to block particular MAC address on PF firewall. I know PF firewall works on the Layer 3 i.e it operates on the IP addresses rather than MAC address.But is there any way to block the MAC address ...
1
vote
1answer
99 views

Mac OS X Firewall isn't firewalling

Rather confused by the results I'm getting on a Mac OS X Server running 10.8. I have an app that is running a web server on port 8000, which I want to be visible only to localhost. This seems ...
2
votes
1answer
223 views

OpenBSD cannot set frag limit more than 6144

I am trying to : set limit frags 10000 and get following info: pfctl: cannot set 'frags' limit When i am trying to set it on 5000 everything works fine.
2
votes
1answer
130 views

PF redirect rule: how to limit the rule to specific user

I was trying to setup a PF redirect rule to force all web traffic from a specific user account to go through a web filter on a shared computer. With iptables, I can use --uid-owner option to limit ...
0
votes
1answer
418 views

Forwarding IP address using pf

I'm trying to forward an external IP address to another external IP address with pf. The equivalent iptables command would be iptables -t nat -A OUTPUT -d [ipaddress1] -j DNAT --to-destination [...
1
vote
1answer
279 views

Local transparent proxy OS X pf

I was trying to create local transparent proxy using this pf rules: rdr pass inet proto tcp from $Out to any port 80 -> 127.0.0.1 port 3129 pass out on $Out route-to lo0 inet proto tcp from $Out ...
1
vote
0answers
77 views

PF rule for Continuity

So it looks like the Continuity on OS X 10.10 creates network interface on the fly (utun2 here) and my PF blocks it, so that I can't make/answer calls. I'm not an admin, just use the IceFloor for PF ...
0
votes
1answer
1k views

using pf for packet filtering and ipfw's dummynet for bandwidth limiting at the same time

I would like to ask if it's fine to use pf for all packet filtering (including using altq for traffic shaping) and ipfw's dummynet for bandwidth limiting certain IPs or subnets at the same time. I am ...
4
votes
1answer
3k views

PF Firewall on OSX with IceFloor

I have set up pf using IceFloor on my OSX 10.9 system running Server 3.0.2. Everything seems to be fine except that I can not connect to the system using the DNS name or the public IP from localhost. ...
0
votes
0answers
109 views

FreeBSD - How can I let server A get web access via server B over a specific port?

Setup: Server A: FreeBSD 10 - IP: 100.100.100.100 Server B: FreeBSD 9 - IP: 200.200.200.200 Both servers use pf.conf. Desired result: I want server A to be able to get web access (port 80) via ...
0
votes
1answer
600 views

correctly setup PF with loopback interfaces for nginx proxy

I am trying to run couple of freebsd jails for my web server and application server, which is running node.js I have one network card (igb0) with a custom loopback interface (lo666) for which i have ...
1
vote
1answer
1k views

PF: Block all, but one subnet firewall rule?

I'm trying to do something that I thought would be relatively simple: Block all the traffic to a test server, other than my company's subnet. I've tried things along these lines (111.111.0.0 is my ...
1
vote
0answers
107 views

PF Firewall Rules Help - Block IP Hammering

I'm having an issue where someone is using a VPN / proxy to hammer my server. They will pick on random URL from my website and perform ~20 requests per second to it. Once I ban the IP address, a few ...
1
vote
1answer
168 views

Expanding a macro containing a subnet IP address with prefix (CIDR) in a list using PF firewall

I’m trying to expand a macro that contains an address with a subnet mask into a list with PF like so: subnet1 = "192.168.1.0/24" subnet2 = "10.0.0.0/8" subnets = "{" $subnet1 $subnet2 "}" But this ...
0
votes
1answer
602 views

PF firewall frontend [closed]

I'm running FreeBSD 9.2 and the PF firewall. I'm looking for an easier/faster way of adding and modifying my PF rules. Preferable a simple web ui. Is there any software like this available? I've ...
0
votes
1answer
418 views

FreeBSD pf Egress Filtering

I am attempting to build a simple pf.conf which includes NAT allowing traffic out of the network from all systems on a select series of ports. In my basic configuration I have an internal server that ...
4
votes
1answer
291 views

routing table vs PF precendence

I am wondering when a packet reaches an interface and I have some PF rules, which gets checked first, the routing table or the ruleset? ext_if = "em0" int_if = "em1" localnet = $int_if:network ...
1
vote
1answer
275 views

Limit ftp connections with pf firewall at FreeBSD

I want to limit simultaneous FTP connections to my FreeBSD server with the pf firewall. For example that only 10 simultaneous connection are possible to the port 20 or 21 from one source IP. I use ...
0
votes
1answer
550 views

pf not execute udp port specific block rule

The traffic I want to block can be sniffed as below with tcpdump: 19:16:22.391164 IP 95.95.95.95.2036 > 10.10.10.10.443: UDP, length 8192 So I wanted to write a rule block any udp destination ...