Is there a way to do ssh tunnel to the jails thru the host's ssh without using the jails' own ssh? I do not want to open up all ssh ports in order to access mysql 127.0.0.1:3306 or glassfish 127.0.0.1:4848 ports securely.
My pf.conf:
My pf.conf:
Code:
ext_if = "em0"
int_if = "lo0"
int_net = "255.255.255.0"
mysql_addr = "192.168.1.126"
web_addr = "192.168.1.127"
webapp_addr = "192.168.1.128"
kvm_addr = "192.168.1.130"
ext_addr = "192.168.1.131"
set skip on $int_if
nat on $ext_if from $int_net to any -> ($ext_if)
# Forward host port to web jails (experimental only)
rdr on $ext_if proto tcp from any to $ext_addr/32 port 80 -> $web_addr port 80
rdr on $ext_if proto tcp from any to $ext_addr/32 port 81 -> $web_addr port 81
rdr on $ext_if proto tcp from any to $ext_addr/32 port 82 -> $web_addr port 82
rdr on $ext_if proto tcp from any to $ext_addr/32 port 83 -> $web_addr port 83
block in all
pass out all
pass in on $ext_if proto tcp from any to $ext_addr port 22
pass in on $ext_if proto tcp from any to $web_addr port 80
pass in on $ext_if proto tcp from any to $web_addr port 81
pass in on $ext_if proto tcp from any to $web_addr port 82
pass in on $ext_if proto tcp from any to $web_addr port 83
pass in on $ext_if proto tcp from any to $webapp_addr port 22
pass in on $ext_if proto tcp from any to $webapp_addr port 80
pass in on $ext_if proto tcp from any to $webapp_addr port 443
#pass in on $int_if proto tcp from any to $mysql_addr port 3306
#pass in on $int_if proto tcp from any to $webapp_addr port 4848