I have PPTP vpn server installed on my ubuntu and connected from my another pc to this server.
on my client I have some application connects to this IP address
tcp://126.96.36.199:8888 and I would like to route this IP to another IP address.
What I have tried and partially working is:
iptables -t nat -A PREROUTING -d 188.8.131.52 -p tcp -j DNAT --to 127.0.0.1 /sbin/iptables -A FORWARD -s 184.108.40.206 -d 127.0.0.1 -j ACCEPT sysctl -w net.ipv4.conf.eth0.route_localnet=1
When I run this command on my server and try to connect to that IP I get connection failed
telnet 220.127.116.11 8888
and when I delete it the connection works.
I have a TCP server on my server listening on 8888 and it works but I don’t know what I’ve missed.