Need Help Adding VOIP Provider IP Addresses

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Need Help Adding VOIP Provider IP Addresses

Postby escondido » Sun Jun 30, 2019 7:57 pm

I'm having a really hard time getting Vicibox to allow traffic from a new provider that utilizes ip address authorization. I added their ip addresses to iptables as follows.

iptables -A INPUT -p udp -m udp -s term.skyetel.com --dport 5060:5069 -j ACCEPT

iptables -A INPUT -p udp -m udp -s 52.41.52.34/24 --dport 5060:5069 -j ACCEPT

iptables -A INPUT -p udp -m udp -s 52.8.201.128/24 --dport 5060:5069 -j ACCEPT

iptables -A INPUT -p udp -m udp -s 50.17.48.216/24 --dport 5060:5069 -j ACCEPT

Iptables-save

I confirmed the ip addresses are listed per "iptables -vnL" However, if I reboot the server those ip addresses are deleted. I'm not sure why. The only way I'm able to see them listed as reachable per "sip show peers" is if I turn off the firewall "sudo /sbin/rcSuSEfirewall2 stop." Obviously, that's not ideal.

I then entered the same ip addresses using yast firewall, via Custom Rules. Entry looks like the following.

Source Network Protocol Destination Port Source Port Options
52.41.52.34/24 5060 5060 x
52.8.201.128/24 5060 5060 x
50.17.48.216/24 5060 5060 x

Unfortunately, that doesn't work either. Anybody else encounter the same issue and know how to make them reachable?
ViciBox 8.1.2| Version 2.14-694a Build-181005-1738 | Asterisk v.13.21.1-vici | Vultr Cloud | No Extra Software | Zoiper 3.15
escondido
 
Posts: 14
Joined: Tue Oct 23, 2018 9:24 pm

Re: Need Help Adding VOIP Provider IP Addresses

Postby ThirdRockTelecom » Mon Jul 01, 2019 12:47 pm

Have you considered using PoundTeam's Dynamic Good Guys to protect your system? William Conely can get you more info.
VoIP for Call Centers using VICIdial
Third Rock Telecom
http://www.ThirdRockTelecom.ca
Skype: TheJoeyAnderson
(855) 807-7625

VoIP for Call Centers | DIDs/Inbound | Data | Ringless Voicemail | Voice Broadcasting | SMS
ThirdRockTelecom
 
Posts: 2
Joined: Mon May 06, 2019 3:33 pm

Re: Need Help Adding VOIP Provider IP Addresses

Postby williamconley » Mon Jul 01, 2019 1:26 pm

other implementations of iptables have an auto-save feature. opensuse's implementation does not. it has a rather interesting group of configuration files used to support the iptables-based YAST firewall implementation.

so use yast firewall's "custom" pane to add UDP opens for the ips in question (it's not really necessary to specify the specific ports, just open UDP)

or (of course) you could install Dynamic Good Guys firewall which makes opening individual IPs pretty simple, but starts with locking down the yast firewall as a prerequisite. DGG is really just a couple pages to make it easier to get through the firewall, the lockdown happens first and includes instructions for hard-coding of "these need to stay ON" during the install (eg: your home IP address should not be in a place where someone may accidentally delete it in an overly simple interface).
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20018
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Need Help Adding VOIP Provider IP Addresses

Postby escondido » Mon Jul 01, 2019 3:13 pm

I appreciate the information. I added just the ip addresses/UDP as an External Zone. Restart and save doesn't show a change for some odd reason. This is quickly becoming annoying.

I'm gonna give DGG a try and see what happens.
ViciBox 8.1.2| Version 2.14-694a Build-181005-1738 | Asterisk v.13.21.1-vici | Vultr Cloud | No Extra Software | Zoiper 3.15
escondido
 
Posts: 14
Joined: Tue Oct 23, 2018 9:24 pm

Re: Need Help Adding VOIP Provider IP Addresses

Postby williamconley » Mon Jul 01, 2019 3:21 pm

if you added them the same way, as I said previously, that's not going to be saved. only changes in yast firewall will be changed after reboot. opensuse's startup process builds the firewall from their configuration files.

dgg install contains some of the file names and instructions on how to save changes to various areas of the firewall (even if you don't actually install dgg, that's useful!)
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20018
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Need Help Adding VOIP Provider IP Addresses

Postby escondido » Mon Jul 01, 2019 8:03 pm

I just entered the ip addresses into yast firewall after selecting the CUSTOM RULES section. I only selected UDP for them. Then went to Start-Up and selected "Save settings and restart Firewall now." That is the section you're talking about, right? Asterisk shows them as unreachable still.

Then I rebooted the server and all of them showed OK at first, and then Asterisk shows me the following

[Jul 1 19:46:26] NOTICE[1981]: chan_sip.c:30180 sip_poke_noanswer: Peer 'SkyetelVA' is now UNREACHABLE! Last qualify: 32
[Jul 1 19:46:26] NOTICE[1981]: chan_sip.c:30180 sip_poke_noanswer: Peer 'SkyetelCA' is now UNREACHABLE! Last qualify: 40
[Jul 1 19:46:26] NOTICE[1981]: chan_sip.c:30180 sip_poke_noanswer: Peer 'SkyetelOR' is now UNREACHABLE! Last qualify: 62
[Jul 1 19:46:27] NOTICE[1981]: chan_sip.c:30180 sip_poke_noanswer: Peer 'SkyetelTERM' is now UNREACHABLE! Last qualify: 1061

Those entries are part of the dial plan since I did not provider any names for the ip addresses using yast firewall. The ip addresses should be whitelisted since they are listed. Went back into yast firewall and disabled it to see what happens. All of the ip addresses immediately become reachable. WTF, ya know lol.

Gonna read over the DGG documentation. This is driving me nuts.
ViciBox 8.1.2| Version 2.14-694a Build-181005-1738 | Asterisk v.13.21.1-vici | Vultr Cloud | No Extra Software | Zoiper 3.15
escondido
 
Posts: 14
Joined: Tue Oct 23, 2018 9:24 pm

Re: Need Help Adding VOIP Provider IP Addresses

Postby williamconley » Mon Jul 01, 2019 8:17 pm

firewall doesn't make them "REACHABLE". Firewall allows them to send you packets even if you haven't sent them packets first. The stock firewall allows returning packets from someone you've sent a packet to. None of that is related to "REACHABLE" directly. REACHABLE is achieved when they receive your qualify packet and respond to it and you receive the response. But since the built in firewall specifically allows responses, nothing we are doing here was related to REACHABLE in the first place.

However: externip=SERVER_PUBLIC_IP in /etc/asterisk/sip.conf is directly related to REACHABLE, as are other firewall settings (if you have modified the standard opensuse firewall, that is). Additionally, NAT (if your server is on a private IP instead of directly on a public IP) is also related. And of course the carrier has to send you that return packet.

Return packet is not something you can control from This Side: that you can test by turning OFF the firewall for a minute, if the sip account is still UNREACHABLE the firewall is not involved directly as "the problem". (Perhaps A problem, but not The problem. lol) So you'd have to get REACHABLE resolved first, then turn on the firewall and see if the firewall breaks it again and adjust the firewall. However: Stock Vicidial has no problem with outbound calls, as a rule, since it's designed to allow the server to communicate with any IP to which it reaches out. But an outside IP initiating the connection requires authorization (definition of whitelisting).

Of course, you can always change qualify=no but then there will be no verification of a connection. I've only seen one or two carriers in ten years that don't respond to qualify packets but do allow calling.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20018
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)


Return to Support

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 109 guests