Score:0

requests from different web sites are egressing from the routing src ip not assigned ip

cn flag

I have dedicated server from OVH, that has 40 ip addresses on three routes.

ip route show
default via x.y.z.254 dev eno0 
a.b.c.0/24 dev eno0 proto kernel scope link src a.b.c.161 
x.y.b.0/24 dev eno0 proto kernel scope link src x.y.b.74 
x.y.z.0/24 dev eno0 proto kernel scope link src x.y.z.238

For example, 16 ip addresses on routing a.b.c.0/24 ending with 160 to 175.

There is a PLESK hosting control panel, like whm/cpanel.

When a domain is assigned to an ip on the routing a.b.c.0/24 then it works.

When I ping the domain or open the domain it's ok, but all the requests that's going out from that domain are going to be from the routing source ip, regardless of the ip assigned to it.

For example the domain is assigned to a.b.c.162, all the requests that are coming from it, for example using cron or whatever the server in back-end ( php ) do are coming from a.b.c.161.

How can I solve this problem?

vidarlo avatar
ar flag
Why do you need to solve it?
Shreef Entsar avatar
cn flag
because I depend on the domain outing request ip for something related to a license that check the domain against it's ip, and I can't share the ip with more than one domain.
cn flag
Responses egress over the same network adapter and IP address if strong host model routing is enabled. It's the default on Windows but on Linux, the weak host model is the default. See the following for more information and settings. https://unix.stackexchange.com/questions/258810/linux-source-routing-strong-end-system-model-strong-host-model
Score:0
cn flag

just in case you came here in my same situation that you have PLESK and lot of ip's when you add a new ip add it with that way

x.y.z.xxx/255.255.255.255

that way it will use itself when it's doing outgoing requests.

I have tested that on Plesk on Debian and it's working good :)

to explain more : let's say we want to add this list of ip's: 10.10.10.160 10.10.10.161 and so on until 10.10.10.175 the default way to add it in Plesk using the mentioned OVH subnet mask it was 10.10.10.175/28 or 10.10.10.175/255.255.255.240

this will result https://talk.plesk.com/attachments/1690730754128-png.23903/

so our network address that will respond or do outgoing requests is 10.10.10.160

but when we add it like that 10.10.10.175/32 or 10.10.10.175/255.255.255.255 this will be the result

https://talk.plesk.com/attachments/1690730853059-png.23905/

and this will be our network address that will be used on outgoing requests : 10.10.10.175

Shreef Entsar avatar
cn flag
the problem again was: I have 40 domain on the server , every domain has it's own user on Plesk ( control panel ) and it's own IP, it's working very good at the web hosting and inbound requests level. but when for example this domain ( the code on domain ) do external request, it was doing it using another domain than what it's assigned. the default way adding the domain in Plesk is using the 255.255.255.0 which will use the first ip at the available range ( in my case 160 ) and use it. this might be not a big problem for most of users, but it's big problem for my clients.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.