Connect two gateways to my freepbx server here are the IPs 192.168.52.1, 192.168.52.204

hi please is there a way to address two ip gateways to my freepbx server if yes!! comment do it

If you are just trying to route some IP address ranges through the second gateway, for example because it’s a VPN server, for testing you can just issue an ip route command. To make it persistent, see
https://forums.debian.net/viewtopic.php?t=152079
or

according to your OS version.

If you are trying to do something more complex, for example redundant internet services or trunks requiring different ISPs, please provide details.

my freepbx server only has one interface called eth0… how to add

Assuming that it has an IP address in the 192.168.52.x subnet, the two gateways should be directly reachable. Please explain when each one should be used.

I have a box which has an IP address of 192.168.52.1 and my server 192.168.52.201 and a second box with an IP address of 192.168.100.1… I want from my freepbx server to be able to ping the machine of the two networks

here is the address of the two networks 192.168.52.1, 192.168.100.1

These are addresses of nodes, not networks. To specify a network, you need to include a netmask, and the base address should contain all zero bits in the part masked by the netmask.

I’m guessing you have two VoIP providers, neither of which are on the internet, but rather use private networks. However you really need to describe your network topology and design constraints in some detail, if you cannot find networking expertise locally.

Are any IP phones connected to either of these networks?

This is not a FreePBX question. It’s mainly about IP networking, with some limited details specific to Linux.

Both of these hosts would be visible to each-other in subnet 192.168.0.0/17

I did think of suggesting that! However, whilst a literal reading of the OP’s question certainly permits that answer, so it is the simplest answer to the question posed, it seems to me unlikely that their real design constraints allow it, and my questions were trying to elicit enough information to eliminate it (or, just possibly, to confirm that it was practicable.

(Note that you actually meant /16, not /17.)

No, I really meant /17 as it’s range is

192.168.0.1 - 192.168.127.254

Two ‘generic’ answers:

  1. Add a 2nd NIC. USB-Ethernet adapters are ~$10, often less. For example: https://www.amazon.com/USB-Ethernet-Adapter-Gigabit-Switch/dp/B09GRL3VCN/
  2. Use a smart switch to put the two networks on separate VLANs to the PBX.

For better answers, please tell us how FreePBX will be using the networks.

“In terms of topology, how does your FreePBX connect to both networks, that is, how is it connected to the network?
Is there a switch or another device that allows you to reach both boxes (192.168.52.1, 192.168.100.1)?
If you have a general diagram of how you intend to access these two addresses, it would be very helpful.”