Cannot ping in the internet from FreePBX

This morning I logged in to update the modules from GUI and noticed the error: “Warning: Cannot connect to online repository(s) (https://mirror.freepbx.org). Online modules are not available.”

I have not done any changes. This configuration worked in the past when I first installed FreePBX but I haven’t logged in for 2 months.

I logged in to CLI and tried pinging www.google.com and 8.8.8.8 with no result.
Traceroute lists:
1 * * *
2 * * *
3 * * *
and so on.

Tried disabling the firewall, reponsive firewall and IPS, restarting the network service and the system. Doesn’t change anything.
I can still make and receive outside calls with the SIP trunk.

ETH0 is the internal network, ETH1 is the SIP network.

FreePBX IP is: 172.20.2.95
route-eth0 looks like this:
172.20.2.0/24 via 172.20.5.1 dev eth0
172.20.3.0/24 via 172.20.5.1 dev eth0
192.168.3.0/24 via 172.20.5.1 dev eth0
172.20.5.0/24 via 172.20.5.1 dev eth0

ETH1 looks like this:
DEVICE=eth1
BOOTPROTO=static
ONBOOT=‘yes’
IPADDR=192.168.27.186
NETMASK=255.255.255.252
ZONE=external
GATEWAY=192.168.27.185
PEERDNS=no
IPV6_PEERDNS=no
DESCRIPTION=“unset”

ETH0 looks like this:
DEVICE=eth0
BOOTPROTO=static
ONBOOT=‘yes’
IPADDR=172.20.5.95
NETMASK=255.255.255.0
ZONE=internal
GATEWAY=172.20.5.1
PEERDNS=no
IPV6_PEERDNS=no
DESCRIPTION=“unset”

DNS servers are:
2 internals IPs
3rd one is 8.8.8.8

route -n lists:
Destination Gateway Genmask iface
0.0.0.0 192.168.27.185 0.0.0.0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 eth1
172.20.2.0 172.20.5.1 255.255.255.0 eth0
172.20.3.0 172.20.5.1 255.255.255.0 eth0
172.20.4.0 172.20.5.1 255.255.255.0 eth0
172.20.5.0 0.0.0.0 255.255.255.0 eth0
192.168.3.0 172.20.5.1 255.255.255.0 eth0
192.168.3.0 0.0.0.0 255.255.255.252 eth1

What am I doing wrong? I don’t understand how it worked in the past and now it doesn’t…

It appears that your default route is via eth1 (connection to trunk), but it should be via eth0 (connection to router/firewall). Confirm that you can ping 172.20.5.1. If not, it’s probably a physical connection issue, rather than configuration. If ping 172.20.5.1 is ok, try commenting out the GATEWAY entry for eth1. Reboot and test.

If I comment out the Gateway for ETH1 I can ping www.google.com but I can’t make calls anymore.

That suggests that the more specific routes through eth1 have the wrong destination (or you removed more than the default route).

the public SIP trunk ip is 82.76.7.xx

these are the only routes written:
172.20.2.0/24 via 172.20.5.1 dev eth0
172.20.3.0/24 via 172.20.5.1 dev eth0
192.168.3.0/24 via 172.20.5.1 dev eth0
172.20.5.0/24 via 172.20.5.1 dev eth0

do I have to add another one?

If you want eth1 to be used, there has to be a route down it to whatever you want to access using it.

I want to use eth0 to access the GUI and to be able to download updates.
ETH1 to make calls through SIP.

if I delete all the entries from route-eth0 then again I can ping www.google.com and access the GUI but again I can’t make calls.

If I add the Gateway to ETH1 I can’t connect to GUI anymore.

I don’t understand what am I doing wrong here as I have a similar deployment but with different IPs also set-up by me in a different location where everything works fine.

Add a route to your VoIP provider, not a default gateway

My ip 172.20.3.19 is from subnet 172.20.3.0/24 from where I will access the GUI but I also have a softphone installed and will also add a hard phone to test.

What route would send the voip data to the voip provider but send the rest to the eth0?

Sorry if I am not explaining right, I am a newbie.

What IP addresses does the provider use?

The host public IP of the SIP trunk is 82.76.7.xx
The eth1 interface of FreePBX has 192.168.27.186. Gateway 192.168.27.185

is this what you were asking?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.