Port Forward (TCP/UDP) ?

Post Reply
CanadianJeff
Junior Member
Posts: 8
Joined: 15 Jan 2009, 09:00

Port Forward (TCP/UDP) ?

Post 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) ?
chirpy
Moderator
Posts: 3537
Joined: 09 Dec 2006, 18:13

Post 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).
claus
Junior Member
Posts: 5
Joined: 06 Apr 2007, 11:25

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

Post 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]#
claus
Junior Member
Posts: 5
Joined: 06 Apr 2007, 11:25

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

Post 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 ?
Post Reply