You're viewing a comment by Klickback and its responses.

Klickback Permalink
October 28, 2013, 06:21

@Bob: With pf on FreeBSD, I use something like this:

# Let's assume your public-facing interface is called "re0" and
# public IP is "". Substitute your own values here

# Let's say you have nginx running on port 8080
# Forward nginx's port 8080 to external IP port 80
rdr on $ext_if proto tcp from any to $ext_addr/32 port 80 tag nginx -> $ext_addr port 8080

#Allow visitors to Nginx on port 8080
pass in quick on $ext_if proto tcp from any to $ext_addr port 8080 tagged nginx

Comment Responses

bob Permalink
October 29, 2013, 00:10

Cool, thanks!

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the first letter of your name: (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.