Answer the question
In order to leave comments, you need to log in
How to correctly wrap a request to a local address?
Good afternoon.
Could you please tell me how you can locally wrap the request to yourself
The bottom line is, there is a server, it has an external address, suppose this: 233.233.233.233 its
local address is this: 192.168.0.1
how can I make a request sent from php to the address 233.233.233.233 was wrapped to localhost or to 192.168.0.1
Answer the question
In order to leave comments, you need to log in
Well, in theory, here it is:
-t nat -A PREROUTING -d 233.233.233.233 -j DNAT --to-destination 192.168.0.1
-t nat -A POSTROUTING -s 192.168.0.1 -j SNAT --to-source 233.233.233.233
Give host A a dns record with an address from the network 192.168.0.0/24 and make all requests for the name.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question