Home > OS >  The Linux port forwarding.
The Linux port forwarding.

Time:09-20

New people ask A question. I have A database, in C server, LINUX server can connect the C B, but I can't the machine Windows 7 A even. I think using iptables to do port forwarding, but seems to be useless, still can't do it., idea is A to B, B to C, B do middle forward.



I'm here where there is a problem? If there is a problem, how should do ah, thank you



Port forwarding:

Linux system



1. Prepare environment



Cloud server 193.112.1.43 (male)



Cloud database PGSQL 172.16.32.98:5432



2. The cloud server to do the following forwarding



Iptables -t NAT - A PREROUTING - d 193.112.1.43 -p TCP -- dport 5432 - j DNAT - to - destination 172.16.32.98:5432 # destination address conversion



Iptables -t NAT - A POSTROUTING - d 172.16.32.98 -p TCP -- dport 5432 - j SNAT - to - source 193.112.1.43 # source address translation





Echo 1 & gt; The/proc/sys/net/ipv4/forward ip_forward # open effect (temporary)

CodePudding user response:

I feel my needs are not common port forwarding, the traditional port forwarding is A to B, B put forward A request to C, so real or A request to C.
I should call port mapping??
  • Related