This page is READ-ONLY. It is generated from the old site.
All timestamps are relative to 2013 (when this page is generated).
If you are looking for TeX support, please go to VietTUG.org

pf: simple filter and redirect rules

Added by anhhk over 3 years ago

Read and understand it. So easy :)

EXT_IF="le0" 
OPEN_PORT="{22, 4567}" 

# Redirect, :4567 => :22
rdr on $EXT_IF inet proto tcp from any to any port = 4567 -> 127.0.0.1 port ssh

block return in all
pass  out all

pass in quick on $EXT_IF inet proto tcp from any to 127.0.0.1 port ssh flags S/SA keep state
pass in quick on $EXT_IF proto tcp from any to any port $OPEN_PORT
pass in quick inet proto icmp all icmp-type echoreq

Comments