Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Voice over IP (VOIP) services are changing router design.

    Scheduled Pinned Locked Moved Off-Topic & Non-Support Discussion
    17 Posts 4 Posters 1.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N
      netblues @darcey
      last edited by netblues

      There is absolutely NO reason to open up ANYTHING to the internet for internal sip clients to work with voip service.
      pfsense handles this nicely keeping udp states open.
      Port forwarding udp 5060 and the huge ranges that rtp dictates is ONLY needed if you run a sip server behind nat. Running freepbx localy is not considered running a sip server
      unless you have remote users connecting over public Internet (and not vpn).

      All other issues can be resolved either by just clearing states (when debugging) or making registrations more often (like every 30 secs for stringy providers.

      I have also found no use for siproxd.
      As documentation says
      Unless the remote PBX is absolutely strict about the 5060 source port requirement for each phone, this package is not needed.
      Which is WAY deprecated too.
      Change provider if they insist on such things. They are outdated for sure in many many other aspects.

      D 1 Reply Last reply Reply Quote 0
      • D
        darcey @netblues
        last edited by darcey

        @netblues I just revisited my fw/nat rules and my description above was not wholly accurate.
        For the WAN, I port forward UDP 5060 and (a limited) RTP port range inline with what I've configured in my local FreePBX (rather than the provider's).
        IIRC the single trunk I set up does not register with the VOIP provider and I came to the (possibly wrong) conclusion I needed to port forward both SIP and RTP in order to accept calls. No remote users, other than VPN. I arrived at the firewall rules after incrementally testing, so don't think any are unnecessary but may well be wrong.
        WRT to the provider's large RTP port range I referred to, that's UDP destination ports originating from the VOIP vlan (rather than the WAN interface).

        N 1 Reply Last reply Reply Quote 0
        • N
          netblues @darcey
          last edited by

          @darcey said in Voice over IP (VOIP) services are changing router design.:

          IIRC the single trunk I set up does not register with the VOIP provider

          Are you sure about that? Then how does the provider know your (possibly dynamic) ip?
          no-ip hosts?

          @darcey said in Voice over IP (VOIP) services are changing router design.:

          that's UDP destination ports originating from the VOIP vlan (rather than the WAN interface).

          Essentialy this is just nat configuration and outbound rules for voip vlan, which is typically allowed by default, (unless of course you are running a high maintenance environment, opening outbound access as needed.

          D 1 Reply Last reply Reply Quote 0
          • D
            darcey @netblues
            last edited by

            @netblues I suppose I am running a high maintenance environment. I only open up what's needed (or try to!).

            Yes, I have a static IP and have gone with the provider's option 'to your server via SIP'. My reasoning being, it seemed appropriate at the time as I was also setting up a FreePBX instance.

            Seems, then, this may be unnecessary as I could/should configure my FreePBX trunk as a SIP client.

            N 1 Reply Last reply Reply Quote 0
            • N
              netblues @darcey
              last edited by netblues

              @darcey
              That is also an option that DOES require portforwarding just 5060 ONLY from your providers ip's, which is ok.
              Taking this to the next level, and since this is udp, it could be spoofed and reach freepbx, in an effort to create denial of service.
              I doubt you will ever be a target, but if you can avoid it then why not?

              (especially for someone that goes the extra mile to open up ports as needed ) :)

              D 1 Reply Last reply Reply Quote 0
              • D
                darcey @netblues
                last edited by

                @netblues said in Voice over IP (VOIP) services are changing router design.:

                @darcey
                That is also an option that DOES require portforwarding just 5060 ONLY from your providers ip's, which is ok.
                Taking this to the next level, and since this is udp, it could be spoofed and reach freepbx, in an effort to create denial of service.
                I doubt you will ever be a target, but if you can avoid it then why not?

                (especially for someone that goes the extra mile to open up ports as needed ) :)

                Right! Thanks. I am going to look at it again and see if I can close some more ports ;-)

                1 Reply Last reply Reply Quote 0
                • V
                  voxmagna1 @darcey
                  last edited by voxmagna1

                  @darcey That's my provider and I won't be generating simultaneous calls. The rest of this thread is interesting since I would rather enable the fewest number of ports. I'm not clear whether when allowed they are always open, or what in the SIP system opens them when a call is made or received. A&A have 4 IP V4 addresses. If I replace their service name with just one of their IP addresses, I can still make and receive calls on one phone, although the second IP could be used for fallback.

                  I have also found no use for siproxd. I couldn't install it on Pfsense V2.6, but could on V2.77. Then decided it was yet another package that needed to be kept in sync with updates and used outbound rules instead. How much damage can hackers do via UDP only ports?

                  D 1 Reply Last reply Reply Quote 0
                  • D
                    darcey @voxmagna1
                    last edited by darcey

                    @voxmagna1
                    My understanding, more so having considered this thread is, if you re-register your client with the SIP provider's server well within the state retention of the firewall, you don't need to explicitly open any WAN ports.
                    The incoming SIP requests are allowed because of firewall state and the RTP connections will be initiated by you, rather than the provider, based on info sent in the SIP requests.
                    Because I went the server configuration from the outset, I had to open ports.
                    I used the A&A wiki for both freepbx trunk config and IP ranges. Also, according to the wiki, there may be more than 4 SIP servers.
                    I don't think the RTP ports are permanently listening, only opened as necessary as calls progress.
                    But all that is mute if you can setup your VOIP client and stateful firewall with the appropriate re-register interval and state timeouts.
                    In my first reply, I think I forgot much of what I learnt in the process of setting things up. So may have complicated things!

                    N V 2 Replies Last reply Reply Quote 0
                    • N
                      netblues @darcey
                      last edited by

                      @darcey said in Voice over IP (VOIP) services are changing router design.:

                      if you can setup your VOIP client and stateful firewall with the appropriate re-register interval and state timeouts.

                      Yes, this is the recommended approach, security wise.
                      No port forwards whatsoever.

                      1 Reply Last reply Reply Quote 0
                      • V
                        voxmagna1 @darcey
                        last edited by

                        @darcey said in Voice over IP (VOIP) services are changing router design.:

                        In my first reply, I think I forgot much of what I learnt in the process of setting things up. So may have complicated things!

                        I'm forgetting a week after getting it to work! But I'll go back to revisit re-register intervals and state timeouts. Perhaps I misunderstood that when sitting behind a non static public IP, I had to configure VOIP traffic for NAT traversal?

                        D 1 Reply Last reply Reply Quote 1
                        • D
                          darcey @voxmagna1
                          last edited by

                          @voxmagna1 Something else that may help: Firewall Optimization Options

                          1 Reply Last reply Reply Quote 1
                          • First post
                            Last post
                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.