1

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 to any port 80 keep state

but the problem is that when proxy server is trying to connect to remote server(port 80) it also gets redirected creating infinite redirection loop. Is there anything i can do?

Nonxnull
  • 11
  • 2

1 Answers1

0

Yup. Second line (first non-nat rule) isn't needed at all.

Use something like set skip on lo0 - you don't need to filter it anyway.

drookie
  • 8,625
  • 1
  • 19
  • 29