Creating Static Routes

I am looking for an way to create static routes. The FreePBX GUI only allows you to add a static IP and default gateway under system admin. Is there somewhere else in the GUI that allow static routes to be added?

Hi,

You will need static routes through the linux operating system.

Thank you,

Daniel Friedman
Trixton LTD.

I realize that is what I need to do, but is there a good source of instruction on how to do that? I have found lots of bits and pieces but nothing that really explains it to novice Linux admin. I can definitely tell you how to do it Windows, Cisco and may other configurations but I cant seem to find anything that makes any strait forward sense. Thank you though for your for help.

Hi,

Let us assume that the ip address of your SIP provider is 200.200.200.100.
Add a permanent static route to the file /etc/sysconfig/network-scripts/route-eth0 like this:

200.200.200.100/24 via 173.168.0.1 dev eth0

After adding this file, you will need to restart your network service like that:

service network restart

To check that everything was added to the routing table, you can check it like that:

route -n

Do not forget to add all of your local networks to the sip settings module (LAN and the SIP provider’s LAN).

Just one warning though:
If you are not sure how to do it, I suggest to work in a console environment to avoid locking yourself out of the server.

Thank you,

Daniel Friedman
Trixton LTD.

I found the network-scrips folder, but there is no “route-eth0” file in the folder?
Do I just create file called “route-eth0” and add the static routes?

Hi,

Yes, you should create this file and then restart the network service.

Thank you,

Daniel Friedman
Trixton LTD.