Page 1 of 1

Port Forward (TCP/UDP) ?

Posted: 24 Feb 2009, 08:54
by CanadianJeff
possible to port forward ports say from linux to windows?

source : port / dest : port

0.0.0.0:6112 192.168.x.xxx:6112 (TCP/UPD/BOTH) ?

Posted: 24 Feb 2009, 10:54
by chirpy
There's no provision in csf to perform port forwarding. You'd need to do that manually with iptables in a csfpost.sh script (see readme.txt).

root@server7 [/etc/csf]# iptables -t nat -L -n

Posted: 03 Nov 2009, 22:09
by claus
I did that but is not working :( why doesn't open port 81 ?

iptables -t nat -A PREROUTING -p tcp -i eth0 -d 212.146.105.56 --dport 81 -j DNAT --to 10.10.10.2:80
iptables -A FORWARD -p tcp -d 10.10.10.2 --dport 80 -j ACCEPT


so ?


root@server7 [/etc/csf]# iptables -t nat -L -n
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DNAT tcp -- 0.0.0.0/0 212.146.105.56 tcp dpt:81 to:10.10.10.2:80


Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- 10.10.10.0/24 0.0.0.0/24

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
root@server7 [/etc/csf]#


root@server7 [/etc/csf]# telnet 212.146.105.56 81
Trying 212.146.105.56...
telnet: connect to address 212.146.105.56: Connection refused
root@server7 [/etc/csf]#

DNAT tcp -- 0.0.0.0/0 212.146.105.56 tcp dpt:81 to:10.10.10.2:80

Posted: 04 Nov 2009, 10:08
by claus
I did that but is not working

so ?

root@server7 [/etc/csf]# iptables -t nat -L -n
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DNAT tcp -- 0.0.0.0/0 212.146.105.56 tcp dpt:81 to:10.10.10.2:80


Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- 10.10.10.0/24 0.0.0.0/24

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
root@server7 [/etc/csf]#



81/tcp filtered

why is filtered

csf block some how port 81 ?