i have read many post and try it the solutions posted but with no luck,i try it to
nat one port from external ip to anoter port on internal ip, actually the nat from
internal lan works(squid rule)
the interface bce0 is the external and the bce1 is the internal
The internal server ip is 154.2.9.55 , in the interface bce1 i have 2 ip configured
with alias (192.168.1.0/24 and 154.2.0.0/24)
i try to nat from the external ip on port 2698 to 154.2.9.55 port 2697 (ssh)
my pf rules
any help would be welcome
nat one port from external ip to anoter port on internal ip, actually the nat from
internal lan works(squid rule)
the interface bce0 is the external and the bce1 is the internal
The internal server ip is 154.2.9.55 , in the interface bce1 i have 2 ip configured
with alias (192.168.1.0/24 and 154.2.0.0/24)
i try to nat from the external ip on port 2698 to 154.2.9.55 port 2697 (ssh)
my pf rules
Code:
puertos="{53,3129,3130,3121,3128,2698,80,2697,2696,22,443}"
nat on bce0 from bce1 to any -> bce0
set skip on lo0
rdr pass inet proto tcp from 192.168.1.0/24 to any port 80 -> 127.0.0.1 port 3130
rdr pass inet proto tcp from 154.2.0.0/16 to any port 80 -> 127.0.0.1 port 3130
rdr pass on bce0 proto tcp from any to bce0 port 2698 -> 154.2.9.55 port 2697
block in on bce0 all
block in on bce1 all
pass in on bce0 inet proto tcp from any to any port 2696 keep state
pass in on bce0 inet proto tcp from any to 154.2.9.55 port 2697 keep state
pass out on bce0 inet proto tcp from any to any port $puertos keep state
pass out on bce0 inet proto udp from any to any port $puertos
pass in on bce1 inet proto tcp from any to any port $puertos keep state
pass in on bce1 inet proto udp from any to any port $puertos
pass in on bce0 proto icmp
pass in on bce1 proto icmp
any help would be welcome