Date: Wed, 09 Jan 2008 11:35:47 -0500 From: Rodrique Heron <swygue@gmail.com> To: freebsd-pf@freebsd.org Subject: Forwarding another host Message-ID: <4784F7E3.3060508@rodhouse.org>
next in thread | raw e-mail | index | archive | help
Good Day- I'm running FreeBSD 6.2 and I want to know if forwarding to a external host is supported by PF. I want to forward all incoming traffic to port 22 to another host, but it does not work, forwarding to a Jail works though. Here are my configs: ### /etc/rc.conf ifconfig_em0="inet 192.168.2.14 netmask 255.255.255.0" defaultrouter="192.168.2.1" ifconfig_em0_alias0="inet 192.168.2.18 netmask 255.255.255.255" ## JAIL IP gateway_enable="YES" pf_enable="YES" # Enable PF (load module if required) pf_rules="/etc/pf.conf" # rules definition file for pf pf_flags="" # additional flags for pfctl startup pflog_enable="YES" # start pflogd(8) pflog_logfile="/var/log/pflog" # where pflogd should store the logfile pflog_flags="" # additional flags for pflogd startup ### /etc/pf.conf ext_if = "em0" int_if = "lo0" host_ip = "192.168.2.14" jail_ip = "192.168.2.18" external_host = "192.168.2.27" rdr on $ext_if proto tcp from any to $host_ip port 22 -> $external_host port 22 rdr on $ext_if proto tcp from any to $host_ip port 26 -> $jail_ip port 22 pass in quick all pass out quick all Thanks
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4784F7E3.3060508>