Monday, September 10, 2018

Block and Unblock users UNIFI 5.6

In Unifi controller you can block users but selecting the machine and then selecting the machine you want to block off your network, then selecting the BLOCK icon in the properties window





To unblock it is less intuitive for some reason.

Select the insights icon on the screen (looks like an old school lightbulb icon)
Then select KNOWN clients from the first drop down box
Then select the time frame, my example is the last 24 hours
Then select the BLOCKED button on the right corer

You'll see a list of blocked devices, to the right will be an "UNBLOCK" link.
Click on each device you want to unblock.


The device should now be removed from the list


Monday, July 9, 2018

PUBLIC DNS SERVERS

Google and OpenDNS provide public DNS servers that you can use in conjunction or lieu of your ISP's DNS.

GOOGLE DNS
8.8.8.8
8.8.4.4

OPENDNS (Regular)
208.67.222.222
208.67.220.220


OPEN DNS overs an automatic "family" DNS service.  Pointing your router's DNS settings for DHCP to these two IPS will do an automatic block on a LOT of malicious and adult oriented sites that require DNS to resolve.  For Example "pornhub.com" will fail.  Goto  htttp://www.opendns.org for infomraiton on how to make it work in detail.

OPENDNS (FAMILY ORIENTED) Automatic blocking
208.67.222.123
208.67.220.123

Friday, June 22, 2018

Asterisk - target all calls on trunk to specific destination

Lets say you have a bunch of different trunks, sometimes you need to send calls to a specific destination and NOT use DID routing.

This example has calls that come in on a specific trunk, regardless of what the DID is, caller ID or any other identifying manner, will send the call to an internal number.  This could be a ring group that points to an IVR, or a queue etc.

This was tested in FREEPBX distro but should work in most versions of asterisk.  You might need to use the extensions.conf file instead of the override file outlined below for non-freepbx gui users.

Create your trunk in asterisk and at least verify it works.
then in your context for your trunk put this line in:

context=from-yourcustomdestination

then open up /etc/asterisk/extensions_override_freepbx.conf

put this in as an example: (this one dials extension/ringgroup/queue # of 6990.  Just changed the 6990 number to a destination number.

[from-yourcustomdestination]
exten => s,1,Dial(local/6990@from-internal/n,)

save your changes and exit the editor

type in
asterisk -rx 'core reload'

Call your trunk and test.

When you place a call to that trunk, the trunk should dial 6990. 



Wednesday, June 13, 2018

Audiocodes MP-112 firmware recovery

Have you lost communication to the box because of a pooched firmware upgrade? 
Here is a possible way to salvage it.

AudioCodes boxes, upon boot up will do a BootP process, meaning it will do a call out the network immediately on power up to see if it can download a firmware.

Find the program called the "AudioCodes BootP " or ACbootP.  Google should be able to resolve the app

Now you'll need your firmware files. Essentially the .cmp file for your device.

I was not able to make this update process work reliably on Windows 10 at time of writing.


The same process worked perfectly on Windows 7, so FYI.


1>
Install the ACBootP application on your computer.

2>
Download the appropriate firmware files and put them into a folder.
Here are some firmware files that might help too MP-1XX firmware

3>
Set your PC's network interface to 10.1.10.11 as a local IP.  (AudioCodes box uses .10 as their default)

4>
Disable any AntiVirus you may be running.  These can cause conflicts

5>
Launch the ACBootP app.

6>
Set your TFTP directory to point at the folder that you stored your firmware in.

7>
Make sure the default network for new cliwent has the right Ethernet adapter selected.
yours SHOULD show 10.1.10.11  (my screen shot was done later on, my bad).  You are the server.



8>
Press APPLY.

9>
Now click on "CLIENT CONFIGURATION" at the bottom left


10>
Select ADD NEW CLIENT and the stuff below will appear.

11>
Enter in the MAC address of your AudioCodes device (usually written on the bottom of the box)

CLIENT IP is likely the default ip of 10.1.10.10 (this is the IP that the audiocodes box defaults too usually)
subnet 255.255.255.0
gateway shouldn't matter

TFTP SERVER IP is the ip of your computer that has the TFTP on it.

CMP file is the file of your upgrade you want

12>
Hit APPLY.

Connect the AudioCodes box to your laptop via a network cable and power it up.

If all goes well, your device should boot and start downloading


It will flash pretty quick...and should be basically immediately available via Web Browser.

13>
Log in then "burn" the image when done to make sure it has saved properly.


SETUP TFTP in Asterisk (FREEPBX)

SETUP TFTP in Asterisk (FREEPBX)

here's how:

1> Open the file " tftp " in /etc/xinetd.d/ for editing

2> Modify the " server_args " entry to look like this:

server_args = -vv -s /tftpboot 

If your phones need to be able to create directories, you can put in a " -c " option in there as well

3> Save your changes and exit the editor

4> restart the TFTP service using:  service xinetd restart

That SHOULD do it.

5>  You can look at the TFTP status by typing in:

tail -100f /var/log/messages 

This will give you a 'live' update of the actions of the TFTP as they roll into the log.

Example:
Jun 13 13:00:30 BG-PBX-02 in.tftpd[27960]: sending NAK (1, File not found) to 100.4.100.110
Jun 13 13:04:48 BG-PBX-02 in.tftpd[28596]: RRQ from 100.4.100.110 filename 1120.cfg
Jun 13 13:04:52 BG-PBX-02 in.tftpd[28597]: RRQ from 100.4.100.110 filename SIPA4475A347A5A.cfg
Jun 13 13:05:05 BG-PBX-02 in.tftpd[28660]: RRQ from 100.4.100.110 filename dialplan.txt
Jun 13 13:05:05 BG-PBX-02 in.tftpd[28660]: sending NAK (1, File not found) to 100.4.100.110

Jun 13 13:05:28 BG-PBX-02 php: /sbin/iptables  -A fpbxregistrations -s 100.4.100.110/32 -j fpbxknownreg

Wednesday, May 23, 2018

Fortinet Traffic Shaper by Application

Here's how you traffic shape by APPLICATION type.
Lets say we want to limit social media, specifically facebook.

First, create a traffic shaper.  I called it "SOCIAL MEDIA".  I set it to a LOW priority and MAX bandwidth of 1000Kbps (1 meg)


Next I created a new traffic shaping policy:

SOURCE/DESTINATION = ALL (apply to all groups)
(set destination to a specific address range if you want to limit it to a certain group of users)
but ALL is a pretty good test!

SERVICE = ALL

Set APPLICATION CATEGORY to "Social Media".  Selecting a category just reduces what shows up in the application window to make it easier.

Application = Select all the Facebook ones.  When you click in the "Application" drop box, the box of available apps will show up on the right.  You can shift click to select a range or certain ones.

URL Category isn't probably necessary, but you can select "SOCIAL NETWORKING"

Outgoing Interface = Your internet connection.  Could be WAN1/2 or something, depends on how you configured and named your internet.

SHARED SHAPER & REVERSE SHAPER = both to "SOCIAL MEDIA" (which you created earlier)




Select "OK" at the bottom.

Now click on Policy and Object -> Traffic Shaping Policy

Place it in the list relative to others in the list to ensure its followed.



Now to get this to work, you need to assign "Application Control" setting to each policy that you want this to be used on, and you need to assign an application control policy.

Security Porfiles -> Application Control

Using the Default application sensor for this example
Set "SOCIAL MEDIA" to "MONITOR"


Save those changes, then go to the policy you want this to be applied to and set the Application Control



Move the shaper to an appropriate position in the list.  You would need to be weary of other policies that might over ride the one you put in because their position is higher.


Friday, May 4, 2018

Asterisk - Automatic call

I wanted the asterisk box to make some test calls to me to make sure things were working.
Here's what I did.

This system will place a call out my IAX trunk to a number, and upon answering will play "HELLO WORLD" voice and hangup.

How it works
A shell script is made that the chron job will run (our example, everyday at 3:45 PM)

In that shell script contains the destination number we want asterisk to call, and the sound we want it to play.

Everyday at 3:45 PM the script is run by LINUX which causes asterisk to call  the number and play the sound "Hello world".  then it hangs up.

1> goto /etc/asterisk

2> type in

vi testcall.sh

3> press " " (go into insert mode)
copy and paste the following into that file.  Change "Trunkname" to be the name of your outgoing trunk for external calls.  Change IAX2 to SIP if you use sip trunking.  Put your number in that you want dialed.

#!/bin/bash
echo Channel: IAX2/TRUNKNAME/15552229876 > /tmp/testcall.call
echo Application: Playback >> /tmp/testcall.call
echo Data: hello-world >> /tmp/testcall.call
mv /tmp/testcall.call /var/spool/asterisk/outgoing

4> Press ESC key

5> type:
:wq!
This will save/quit from the app

6> Now type in
chmod 755 testcall.sh

7> Now type in 
crontab -e

8> In your crontab put this in:  (this will run the command at 3:45pm)

45     15     *     *     *         . /etc/asterisk/testcall.sh

9> save / quit  (CTRL X,  Y, then ENTER)


10> You can test the call with this command
./testcall.sh

Within 10 seconds you should get a call.