Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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...

share|improve this question
    
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 Answer 1

up vote 1 down vote accepted

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.

share|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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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