• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Question PHP net_get_interfaces and IPs privacy

Zalem Citizen

New Pleskian
Context : Microsoft 365 no more allow basic SMTP authentication. To allow PHPmailer to send e-mails through M365 Exchange, we set up connectors granting access for one or more IP, and configure PHPmailer to open an unauthenticated SMTP connection on port 25 / TLS.
It's unclear how PHPmailer / PHP / Plesk / Linux will decide which network interface will be used to establish connection.
I tested that and on same server, for same SMTP connection parameters, 2 websites are using 2 different IPs.
So we decide to tell PHPmailer to bind to the interface we choose using something like :
PHP:
$phpmailer->SMTPOptions = [
  'socket' => [
    'bindto' => "x.y.z.t:0",
  ],
];
But this may cause mail delivery to be broken when moving the website to another server, or just changing the IP used by hosting subscription.

That's how I met with net_get_interfaces function.
In one hand it will allow us to display in application a warning message if the IP bound to PHPmailer does not match any of the IPs on server.
On other hand I realize that any website of the server (whose subscriptions are all configured in chrooted environement) has access to the whole list of IPs of server, most of all are IPs dedicated to one subscription only.
It seems to me a peculiar flaw : suppose one website executes corrupted code probing the IPs, using a common service like Reverse IP Lookup - All Names Hosted at an IP - DomainTools then tries to find vulneribilities of other websites...

The disable function is not an option, since, for my need, I find it useful to get a list of IPs (namely the shared ones, and the one dedicated to subscription).
So here is (finally, sorry) my question : is there a way to -maybe- bypass PHP and restrict list of IPs shown by net_get_interfaces() function ?
 
Back
Top