I have set up openvpn server on subnet 10.8.0.0/24 and pf NAT to the internal network 192.168.1.0/24, I had some problems but I solved them and the whole thing is working fine. For the sake of anonymizing the web surfing I am having squid set in another fib, where another instance of openvpn is running, as a client. Squid (version 3.5.11 and compiled with --enable-pf-transparent) is configured for SSL bumping (MITM), and has two ports opened, one as a normal http(s) proxy, and another one as a transparent proxy, the normal web proxy port works fine. Squid has acls set for whole 192.168.1.0/24.
The ruleset for transparent proxying is killing me, I can't make it to work, the nat is proxying the 10.8.0.0/24 network just fine over alias 192.168.1.203 and the rdr pass should catch that address on the other side to reach the squid. But it is like calling the dead... no answer.
I just can't figure out what I am doing wrong?
The phone (openvpn client) is reaching the internet so the whole set up works fine, but not over the squid.
The ruleset for transparent proxying is killing me, I can't make it to work, the nat is proxying the 10.8.0.0/24 network just fine over alias 192.168.1.203 and the rdr pass should catch that address on the other side to reach the squid. But it is like calling the dead... no answer.
Code:
ext_if = "re0"
ext_ip = "192.168.1.203"
vpn_if = "tun2"
vpn_net = "10.8.0.0/24"
nat on ! $vpn_if from $vpn_net to any -> $ext_ip
rdr pass inet proto tcp from $ext_ip to any port 80 -> 127.0.0.1 port 3129
rdr pass inet proto tcp from $ext_ip to any port 443 -> 127.0.0.1 port 3129
I just can't figure out what I am doing wrong?
Last edited by a moderator: