Answer the question
In order to leave comments, you need to log in
Proxy server on linux?
There is a server with linux, let's say at 12.34.56.78 And there are 100 additional ip addresses. Interested in how you can implement the following chain: the browser specifies the server address with a port, say 12.34.56.78:12345. The server, knowing that there is a specific ip address for a certain port (out of that 100), redirects traffic.
The bottom line is that when accessing the address (12.34.56.78:12345; 12.34.56.78:12346; 12.34.56.78:12347) there should be a redirect through another ip (22.34.56.78; 32.34.56.78; 42.34.56.78)
Tell me, is it possible to do this, if so, please tell me the implementation.
Answer the question
In order to leave comments, you need to log in
This can also be done with iptables - it will be faster.
But if you want through a proxy, then the easiest way is with nginx
break-people.ru/cmsmade/index.php?page=translate_s... - hang separate ACLs on each port, hang different tcp_outs on acl.
To redirect traffic from the internal network to the external
iptables -t nat -A POSTROUTING -s destanation_ip -o interface_eth --jump SNAT --to-source ip_gw
To redirect traffic from the external network to the internal
iptables -t nat -A PREROUTING -p protocol_tcp(udp ) -d ip_gw --dport port to which we receive traffic --jump DNAT --to-destination ip_internal:port_to_which_we send_traffic.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question