0

I have a linux server (A) which used to make several calls to another server(B) on an ip (lets say 2.2.2.2).

Now (B)'s ip (2.2.2.2) changed to (3.3.3.3) and I want for my server (A) to route all it's own calls to 2.2.2.2 to 3.3.3.3, constantly. It's a band-aid fix and I want to implement something better like dns etc etc, but for now this would fix.

PS. if it's possible to do through webmin it would be great...

  • Can you qualify "used to make several calls"? Is this a piece of sotware e.g., calling SOAP stuff on B? Is it plain old routing/nating? – tink Nov 7 '12 at 18:42
  • mysql federated tables, mainly. they point to an ip address where there is another mysql server... Just don't want to recreate all tables/alter etc.. too many – Jake Armstrong Nov 7 '12 at 18:50
1

I think that you could do this in your server "A":

iptables -t nat -I OUTPUT -d 2.2.2.2 -j DNAT --to-destination 3.3.3.3

This will make all outbound traffic to 2.2.2.2 go to 3.3.3.3. I've made a couple tests and it seems to work, but I don't promise anything :-)

You possibly won't be able to make this through webmin. Also, it could interfere with your current firewall, if you have one. Try it and let me know how it goes.

| improve this answer | |
  • I have ssh access but I actually forgot password and had webmin saved pass... lol. PS. it works perfectly... – Jake Armstrong Nov 7 '12 at 21:51
  • don't work. is work internet ip ? – Thoman Oct 23 '18 at 8:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.