![]() ![]() (where is the external IP address for serverA, which the /etc/hosts file on serverA resolves to ) but this doesn't follow the main intention which is to keep all traffic between the two servers on the local network. Or, I don't know if this is the right format, but something like, ![]() ![]() The thinking being that, when Product B sends traffic to :12345, that somehow serverB automagically routes it to 192.168.0.1:12345 instead of :12345?Īlternatively I could open up the firewall on serverA port 12345 to accept traffic being sent to by adding to the csf.allow file on serverA the following, Thus, when Product B sends traffic to Product A on serverA, Product B uses :12345, which gets blocked by the firewall.Ĭould I place in serverB's /etc/host file, the following line? Nothing I can do inside the application can change this. When the applications first talk to each other, Product A (as part of its message data) tells Product B that its host name is. The thinking for opening port 12345 for only 192.168.0.2 is that this port's use is only intended for the two servers to talk to each other (no traffic from the outside world ever needs to use this port). Product B knows to talk to Product A on port 12356, but the firewall on serverA only opens port 12345 for 192.168.0.2 using the following code in serverA's csf.allow file: This question was prompted by the following situation (that the answer must address):Ī particular application vendor has a product A on serverA (at 192.168.0.1), and a product B on serverB (at 192.168.0.2). The above is a generic request how to setup the servers so their applications always communicate with each other using local IP addresses. I'm hoping /etc/hosts can achieve this for me. Is there anything special I need to do to ensure ALL applications revert to the local IP addresses when communicating to each other on the local network? Some applications, like Oracle database, can only use a hostname with external IP address, and so there's no option to include the local IP address. The situation I'm experiencing is, receives incoming traffic from and rather than use the local IP address to send traffic back, sends traffic back to using hostname.Ĭan /etc/hosts be edited such that traffic received on from is sent back to using the local IP address of 192.168.0.2? If so, I'll change it similarly on both servers. But, additionally I want traffic on the local network using hostnames of and to be recognized as on the local network and revert to IP addresses of the local network rather than use the external IP addresses (which would send the traffic onto the external network and make for a much larger distance to travel) when talking to each other. The servers will still need to accept and work with external networks using their hostnames, as done currently. ![]() Hi, is there a way I can edit my /etc/hosts file to resolve the hostname to a local network IP address? Currently the /etc/hosts file only has the external IP address there, with a bunch of variations for the host name.įor example, I have two servers comprising a local network. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |