[BSD] freebsd + pf + rdr port problema

Dozen Norbert dozen at bsdmail.com
2005. Ápr. 24., V, 10:29:24 CEST


Hellotok!

Egy olyan problemam lenne, hogy adott egy gateway, ami a netet csinalja, de van egy server a belso halon amin futnak a servicek. Portforwardolni szeretnek erre a serverre.

# macros
int_if = "ed2"
ext_if = "tun0"
neux = "192.168.1.2"

tcp_services = "{ 80, 6667, 21, 2200 }"

# nat/rdr
nat on $ext_if from $int_if:network to any -> ($ext_if)
# http,ssh,irc,ftp to neux

rdr on tun0 proto tcp from any to any port 80 -> 192.168.1.2
rdr on tun0 proto tcp from any to any port 21 -> $neux 
rdr on tun0 proto tcp from any to any port 6667 -> $neux 
rdr on tun0 proto tcp from any to any port 2200 -> $neux 

# basic rulez
pass out on $ext_if proto {tcp, udp, icmp} all keep state
pass in on $ext_if all keep state
pass out on $int_if from any to $int_if:network keep state 
pass in on $int_if from $int_if:network to any keep state 

pass in on $ext_if proto tcp from any to any port 80 flags S/SA
pass in on $ext_if proto tcp from any to any port 21 flags S/SA
pass in on $ext_if proto tcp from any to any port 6667 flags S/SA
pass in on $ext_if proto tcp from any to any port 2200 flags S/SA 

Itt van az en pf.conf-om. Legyszi, ha valaki tud, akkor segitsen.

Koszi dozen

PS: nem fix ip-s netem van. Csak olyan leirast talaltam, ami fix ip-re szol.

-- 
_______________________________________________
Get your free email from http://mymail.bsdmail.com

Powered by Outblaze



További információk a(z) BSD levelezőlistáról