Internet virtualbox

Hello, i have freepbx hosted on virtualbox windows 10,my sip trunk provider registration type is ip based my configuration guy says my server does not have access to my static public ip so i need to tell my isp to add me another ip in my current setup…but reading around, installing a linux os and installing asterisk would solve the issue,kindly advice friends.

Does the VirtualBox VM have outbound access to the Internet? If the networking is properly configured on it then it should be able to reach the SIP trunking provider and reflect its public IP. Likely the public IP of your router/gateway.

As you have noted, if your ISP has DHCP enabled on their WAN interface then this could possibly reflect a different public IP depending. If the ISP provides you a static public IP, then things should work fine. Usually even the DHCP assignment always “sticks” the same IP I’ve found. But to play it safe static makes the most sense.

Presuming you actually “have” a static IP, your VirtualBox network interface needs to be bridged, that way you will get an IP from your router and that router should forward SIP connections from the STATIC IP to that LAN IP and set your Asterisk up as "NAT"ed.

You public IP is your public IP…all your internal devices go out using the same public IP…no matter if the machine in your internal network is virtual or real…

The correct settings of Virtualbox (host Linux Mint, guest freePBX distro) look like this…

Just to clarify for @Samkin, having a Public IP is NOT the same as having a STATIC Public IP, You cannot reasonably use a dynamically rewarded Public IP with “IP Authentication”, but your router CAN share any One PUBLIC STATIC IP address with your PBX and also the rest of your LAN machines.

1 Like

I thought he cannot get his SIP-trunk working, because his freePBX server was a VirtualBox machine hosted by a Windows machine…and it somehow could not use the static public IP. I dont understand how this is possible. I have a business internet connection with a static public IP and all my machines of my internal network use this static public IP. Does he have a special setting?

I believe he said he has been told that he needs his ISP to provide him with a static IP. Think a residential cable modem user. While 90%+ of the time the DHCP public IP that’s handed out will likely be the same, in the event his cable modem (guessing here) reboots and it is leased a different public IP then his SIP trunking provider will reject the registration attempt.

1 Like

i have a public static ip guys and my network setting is as @Charles_Darwin shows,

Then as stated, on your router, you will need to forward your SIP signal port (commonly 5060) and your RTP ports (10,000 -19,999) to the IP address that your Virtual machine has been awarded after using ‘bridged’ networking, and use that Static IP as the destination of your calls. The FPBX should be set up as a "NAT"ed server.

setting up the fpbx in nat’ed mode gives different ip "’…but in nat mode in advance setting i see port forwarding…how do i proceed from there

this ip shows i am in different segment,cant access the pbx

First, set up Virtual Box as @Charles_Darwin says. Confirm that your PBX gets a private IP address in the same subnet as your Windows 10 system.

Next, in Asterisk SIP Settings, confirm that External Address and Local Networks are correctly set. External Address should match what you see when visiting from your Windows 10 system. If you change these settings, after Submit and Apply Config you must restart Asterisk.

Confirm that your External Address (public IPv4 address) is correctly configured on your provider’s portal. Confirm that you have correctly set up port forwarding in your router/firewall, as noted by @dicko .

If you still have trouble, describe in detail what goes wrong with both outgoing and incoming calls.

I just want to add…if you dont have any external phones at other locations or use Sangoma Connect (or Zulu), you dont have to do a port forwarding of your freePBX server.
SIP or IAX trunks work perfectly without any port forwarding and your freePBX server is not exposed to the outside world.
You just need a port forwarding for your remote software (e.g. noMachine) to your Virtualbox host…which in my case is a Linux Mint machine…

If your Virtualbox freePBX server is in a different subnet:

  1. Check if you set to bridge mode in the VM settings
  2. Try to access the web-gui, buy the system-admin module and change the network settings…if you cannot access it, you have to use the VM terminal window on your Windows machine and change the network settings manually…which is not easy…
    …you could also use a FTP-client like Filezilla and a linux-compatible text editor like Proton to change the network config file of your freePBX server…not easy too…
    /etc/sysconfig/network-scripts/ifcfg-eth0 (if it’s a cable connection)

EDIT: the question remains, why you have a wrong network setup on you freePBX VM…did you import your VM from a different location? Usually the freePBX VM will get it’s network settings from the DHCP server…not in your case, it seems…

when i use nat mode gives that different segment ip but bridged gives the 192.168..

Then the freePBX network is set to DHCP-automatic-IP, which is good for the moment.
So…what IP range do you need?
Is 192.168.0 ok? When you access the www using your Windows webbrowser and enter “what is my IP” in Google, is it the static public IP you need?

NAT mode is added complexity that you don’t need. Please test using bridged networking.

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