Page 1 of 1

port forwarding

Posted: Mon Nov 03, 2014 2:25 pm
by steanly
hello,

i have a server on debian, it's running OpenVPN server.

current iptables rules:
iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -s 192.168.88.0/24 -j ACCEPT
iptables -A FORWARD -j REJECT
iptables -t nat -A POSTROUTING -s 192.168.88.0/24 -j SNAT --to-source 81.**.33.**


Debian server:
192.168.88.1

client is assigned an IP:
192.168.88.2

Everything works as it should, but I'm not able to direct port of the outdoor networks 81.**.33.** to the internal network 192.168.88.2

I tried:
iptables -A FORWARD -p tcp -i eth0 -d 81.**.33.** --dport 3389 -j ACCEPT
iptables -t nat -A POSTROUTING -p tcp -d 81.**.33.** --dport 3389 -j DNAT --to-destination 192.168.88.2:3389

does not work, plese help...

Re: port forwarding

Posted: Mon Nov 03, 2014 8:19 pm
by Traffic
Would it not make more sense to have your Remote Desktop server listening on the private IP not the public one ?
Then you make the connection over the VPN.

Note: Is your Remote Desktop server listening on pub.lic.ip.add:3389 ?

Re: port forwarding

Posted: Tue Nov 04, 2014 8:34 am
by steanly
I need to get a port of public IP addresses to the internal IP address of the VPN 192.168.88.2