
I want to share the VPN-ized internet from my tun0 to my ethernet eth0 .
I don't wish for eth0 to provide DHCP and eth0 has a static IP 10.10.10.1
I can enable gateway by using gateway_enable in rc.conf and sysctl settings. I need to know what further lines do I need to add to my pf.conf so as to only safely share the Internet and disallow anything else from coming in eth0 .
The current configuration is given below:
Code:
///////////// pf.conf /////////////
# 192.168.1.0 is the WiFi I get my Internet from.
block drop out inet from 192.168.1.0/16 to any
# Example VPN IP 104.197.53.83
pass out quick inet from 192.168.1.0/16 to 104.197.53.83 flags S/SA keep state
# WiFi Local network
pass out quick inet from 192.168.1.0/16 to 192.168.1.0/16 flags S/SA keep state
# Allow all on loopback (lo0)
pass out quick inet from 127.0.0.1 to any flags S/SA keep state
# Everything tunneled 10.6.0.x (VPN assigned internal Ip for tunnel tun0)
pass out quick inet from 10.6.0.0/8 to any flags S/SA keep state
///////////// End of pf.conf /////////////
Any ideas?
