Now there is IPA: 126.96.36.199 IPB: 188.8.131.52 Gateway: 184.108.40.206
Apache is bound to ipA and another java program is bound to ipB.
iface eth0:1 inet static address 220.127.116.11 netmask 255.255.255.0 gateway 18.104.22.168 iface eth0:2 inet static address 22.214.171.124 netmask 255.255.255.0
Now the data is normal after coming in from ipA, but the data coming in from ipB is also identified as ipA by default, which results in the original users accessing with ipB not receiving the data.
In order to solve the problem temporarily, connect the network cable of the second network card, set the second network card as ipB, and then enter the following command
ip ro add 126.96.36.199 dev eth1 src 188.8.131.52 table 100 ip ro add default dev eth1 table 100 ip ru add from 184.108.40.206 table 100
The two services can be accessed normally, but the solution is too good to know what the correct approach should be.
Are you sure there is no problem with your network configuration? Under normal circumstances, a packet will not be changed from src ip. is there no configuration such as iptables?