Thread: pf.conf help?
View Single Post
Old 27th January 2018
ucharfli ucharfli is offline
Port Guard
 
Join Date: May 2017
Posts: 22
Default

@Prevet;
I applied what you wrote, but I do not get internet.
Am I making a mistake somewhere?
My pf.conf
Code:
#	$OpenBSD: pf.conf,v 1.55 2017/12/03 20:40:04 sthen Exp $
#
# See pf.conf(5) and /etc/examples/pf.conf

wlan_if="ral0"

vpn="{ 2.*.*.*, 7.*.*.*, 6.*.*.*, 9.*.*.*, 8.*.*.*, \
1.*.*.*, 5.*.*.*, 7.*.*.*, 8.*.*.*, 2.*.*.* }"

set skip on lo

block return	# block stateless traffic
pass		# establish keep-state

# By default, do not permit remote connections to X11
block return in on ! lo0 proto tcp to port 6000:6010

# Port build user does not need network
block return out log proto {tcp udp} user _pbuild

####################### VPN ########################## 
######################################################
block out on $wlan_if from 192.168.0.0/16 to any
pass out quick on $wlan_if from 192.168.0.0/16 to $vpn
pass out quick on tun0 from any to any
Do I have to use this?
Code:
net.inet.ip.forwarding=1
My net.inet.ip.forwarding=0
@jggimi;
It was nice, but I do not know how to write a rule with PF from where. That's why I asked for help.

I found something simple, but is it a benefit?
This is something that will not make me feel good.
Code:
set skip on tun0
pass in quick on tun0
Reply With Quote