Remote agents with dynamic IPs and security

Any and all non-support discussions

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

Remote agents with dynamic IPs and security

Postby jshasteen » Tue Apr 24, 2012 9:06 am

I was wondering what the best practice was when using remote agents connected from their homes via SIP when the remote agent is using a residential internet connection with a dynamic IP. Normally with a static IP I would simply allow the necessary ports from the IP in the SuSE custom firewall section and be done with it. I have used fail2ban in the past and it has worked well although I seem to remember it not wanting to come up after a reboot in certain cases but I don't recall the specifics.

I was thinking about coding up a simple little web form that grabs the source IP from and agent and whitelists it after a password and/or security question has been answered and while that might be fun to do I don't really have the time right now :)

- ViciBox 3.1.10
- VERSION: 2.4-326c BUILD: 110506-1612
- Asterisk 1.4.39.2-vici
- Intel(R) Core(TM)2 Quad CPU Q9505 @ 2.83GHz with 8GB RAM
- IAX and SIP used (no TDM capabilities)
Vicibox 8.1 from .iso | VERSION: 2.14-695a BUILD: 181116-1133 | 11.25.3-vici | Single-Server | No Digium/Sangoma Hardware | No Extra Software After Installation | Dell R710 Dual hex-core | 48GB RAM | 8 15k SAS RAID-10
jshasteen
 
Posts: 52
Joined: Thu Sep 16, 2010 11:01 am

Re: Remote agents with dynamic IPs and security

Postby williamconley » Tue Apr 24, 2012 9:25 am

1) Keep all existing setup on "whitelist only"

2) Create a new web page that runs only on port 81

3) Be sure the web page is NOT "index" so it must be addressed directly (no guessing, make it an impossible to guess page name like "akjsajg816j1283ja.php"). Consider rotating it regularly and sending the dynamic agents a link every morning before work if you're really security conscious.

4) That new web page has one purpose: Check user/pass against vicidial_users table (borrow the code from any vicidial page!) and if the user authenticates, add their IP address to the iptables "good" file managed by the "Recent" module in iptables.
This module allows the creation of a file that can be checked against within the iptables system.

5) If an entry is present or absent, special action can be taken. In this case, the action would be ACCEPT, thus after logging in to this page the agent is now "whitelisted" until reboot when that file is cleaned out.

We charge $100 to install this in a standard Vicibox installation, as we've already invested the time to create it. :) And you're right, it was fun to make. I'd like to make it part of Vicibox. Maybe I'll suggest that to Kumba :)
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: 20345
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Remote agents with dynamic IPs and security

Postby jshasteen » Tue Apr 24, 2012 10:07 am

Sweet! Thanks for the detailed response William.
Vicibox 8.1 from .iso | VERSION: 2.14-695a BUILD: 181116-1133 | 11.25.3-vici | Single-Server | No Digium/Sangoma Hardware | No Extra Software After Installation | Dell R710 Dual hex-core | 48GB RAM | 8 15k SAS RAID-10
jshasteen
 
Posts: 52
Joined: Thu Sep 16, 2010 11:01 am


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 53 guests