S
S
SkyManPHP2012-10-17 04:13:58
linux
SkyManPHP, 2012-10-17 04:13:58

Port forwarding with pf on a proxy

Part of /etc/pf.conf

$int_if="192.168.3.1"
$proxy="192.168.1.250"
rdr on $int_if proto tcp from $int_if:network to !(self) port 80 -> $proxy port 3128


With this configuration, the redirect seems to work, although the squid behaves strangely - it says that the URL of the task is incorrect: only the page address, and the server is not specified O_o

What else needs to be done? In Linux on iptables, all this was done using the lines:
iptables -t nat -A PREROUTING -s 192.168.3.0/24 ! -d 192.168.3.1 -j DNAT --to-destination 192.168.1.250:3128
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE

Thank you. I feel that pf is a cool thing, powerful, but hard to understand.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Fedin, 2012-10-17
@zloiia

I will not be original, but did not look here ?

I
iZENfire, 2012-10-17
@iZENfire

Missing "pass".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question