This was from about a year ago, when we were transitioning internet connections. We had two default gateways and obviously traffic can only go out one/come in one. This was for one of our web servers.
The solution is to tag packets:
echo "10 special" >> /etc/iproute2/rt_tables ip route add default via <second gateway ip> table special ip rule add from <second gateway ip> table special
This way, traffic to 220.127.116.11 for example will go in and come out as normal. However if your new IP is 18.104.22.168, the traffic is tagged with "special" and goes out the other gateway.
Hope this helps!