/sbin/ifconfig fxp1 up /usr/sbin/ppp -ddial pppoe
default: set log Phase Chat LCP IPCP CCP tun command set timeout 0 set redial 15 0 set reconnect 15 10000 set server /var/run/ppp.sock "" 0177 pppoe: set device "!/usr/sbin/pppoe -i fxp1" set mtu max 1492 set mru max 1492 set speed sync enable lqr disable acfcomp protocomp deny acfcomp add! default HISADDR set authname <your_user_name> set authkey <your_password>
MYADDR: ! sh -c "/sbin/pfctl -e -f /etc/pf.conf"
This will start pf after the link is up.
ext_if="tun0" int_if="fxp0" internal_net="192.168.0.0/24" scrub in all # for NAT nat on $ext_if from $internal_net to any -> ($ext_if) # for firewall block in all block out all pass quick on lo0 all pass out on $ext_if proto tcp all modulate state flags S/SA pass out on $ext_if proto { udp, icmp } all keep state pass in on $int_if from $internal_net to any pass out on $int_if from any to $internal_net
These are based on several online documents I've read. Since I'm new to OpenBSD, please let me know if you find something I missed. Thanks!