Friday, November 17, 2017

FORTINET PORT FORWARD

Want to port forward someone into your network.  This is how. 
In this example we are port forwarding someone on port 5000 into the network.

1. Creating virtual IP

Go to Policy & Objects -> Objects -> Virtual IPs - Create New -> Virtual IP

This example, we want to open up port 5000 from the external IP of 142.154.2.2 and point it to 192.168.10.5 internally.

Note: doing this doesn't expose the external to internal, were just getting ready, policy will need to be done in step 3.

The "NAME" will be the name that the VIP Group will refer to (step 2).  The VIP group name will be the one that the POLICY and OBJECTS will refer to when you actually open this IP up to the internet.(step 3)




2. Adding virtual IPs to a VIP group

Go to Policy & Objects -> Objects -> Virtual IPs - Create New -> Virtual IP GROUP

Create a VIP group. Under Members, include all three virtual IPs previously created.



3. Creating a security policy

Now you create your IPv4 Policy.

Create a new policy

Enter in the name of this inbound plicy and set the external IP of the network that you want to allow in.

Then select the appropriate OUTGOING interface,
Destination address is the Virtual IP name.



Select OK



Wednesday, November 15, 2017

Reset the root password on Centos7

1 – Boot up and when the GRUB menu is displayed, select option to edit.

2 – Select Option to edit (e)

3 – Go to the line of Linux 16 and change ro with rw init=/sysroot/bin/sh.

4 – Now press Control+x to start on single user mode.

5 – Now access the system with this command.
chroot /sysroot

6 – Reset the password.
passwd root

7 – Update selinux information
touch /.autorelabel

8 – Exit chroot
exit

9 – Reboot your system
reboot

Tuesday, October 17, 2017

Avaya 9608 Phones on asterisk

Here's what I did to get them to work.
This is a document in progress.  I"m just typing down my settings and findings as I go through it, and will clean it up.

First 9608 phone.
Testing FreePBX Distro 13

Took a phone reset the configs to factory

I put 46xxxsettings.txt, 96xxupgrade.txt and SIP97xx_2_6_9_1.bin into var/www/html in my freepbx server

Powered on the phone

Factory login/password
* = enter config file (sometimes it a button marked "PROGRAM" on the screen)
craft = password

I hard coded an IP/mask/gateway (router)
HTTP/S server i put in as my asterisk server (sharing the html folder for its configs)

Everything else was auto
SIGNALLING = SIP
SIP GLOBAL settings:
SIP DOMAIN=IP of pbx
Avaya Environment = NO
Reg Policy =simultaneous
Failback =auto
CFG SERVER= IP Of PBX
USER ID FIELD =no

SIP PROXY = IP of PBX
Transport=tcp
sip port 5060

In asterisk i created an extension 1000 with a password of 1000 (unsecured for testing, server not net accessible anyway)

On the FreePBX configuration is configured the SIP settings to ensure that my network was one that would be recognized (my phone for testing are on a different vlan) and in SIP settings in the FreePBX gui i set TCP = YES

Save the changes and boot up the phone.

The phone should register and show login

Type in my login and password, phone registered.

-----
TODO:
working on how to self configure the phone.  If i type in the user/logon manually, then reboot the phone, it will autologin after, but i want the user/secrete to be deployable from a HTTP server or something.

Some Firmware

Friday, October 13, 2017

RESET Fortinet 60D password

HERE IS HOW YOU CRACK INTO A 60D if you forget the password

Connect your computer to the firewall with a console cable to the console port. ( a blue cisco one will work too)

  1. Find the serial number of your firewall.  
  2. type it into notepad (or something that you can copy/paste from) and prefix it with
    bcpb so it looks like "bcpbSERIAL" (bcpbFWF60D4Q23112312)
  3. COPY that password, you'll only have 15 seconds to type in.  Faster to paste.
  4. Launch whatever terminal program you like.  We'll assume putty and ensure you can console to the firewall.  (9600 baud 8,n,1)
  5. Power cycle the Firewall
  6. It will boot up, wait for the Firewall name and login prompt to appear.
  7. Enter the Username as maintainer
  8. Enter the Password = bcpbSERIAL number of firewall in UPPERCASE
  9. You should now be logged into the firewall
Once you are logged in you can change the password this way:

config system admin
edit admin
set password <psswrd>
end


Perhaps you want to reset the whole firewall back to DEFAULT?

exec factoryreset

This will put your device back to factory.

The logon is usually "ADMIN" with no password, just press enter.

Default IP is 192.168.1.99 (usually)  basically check your gateway if the system dishes out a DHCP address.



Thursday, October 12, 2017

Install ASTERNIC CallCenterPro on FreePBX distribution

Install ASTERNIC CallCenterPro on FreePBX distribution 

If you have the FreePBX distro (tested on 10.13.66-64bit and SNG7-FPBX-64bit-1707-1) at least and want to install ASTERNIC CCenter Pro on your installation you should just need to do the following:

The core of these instructions are from the Asterinic webpage

cd /usr/src
wget http://download.asternic.net/asternic-stats-pro-2.1.1.tgz 

tar zxvf asternic-stats-pro-2.1.1.tgz

cd asternic-stats-pro-2.1.1

(when it asks for SQL password just press "ENTER", the password is blank)

make install

If for some reason your machine doesn't have the "MAKE" app on your instance you can usually get it by issuing this command: yum -y install make

cat /etc/asterisk/manager.conf

Look for the following.  Copy the entry for the secret for your system.
secret=XXXXXXXXXXXXXXXXXXXXXX

Now edit the following file with your favorite linux editor. NANO and VI are very popular

/var/www/html/stats/config.php

enter the password into the following section:

$MANAGER_SECRET = "XXXXXXXXXXXXXXXXXX";

Save the changes.

service asterniclog start

Log into the GUI http://ipOfServer/stats

(i've had situations where at this point, nothing seemed to happen.  In my case, i issued a " service httpd restart"
to kick the webserver off again and it sorted my issue.

(admin admin)

goto SETUP-> PREFERENCES

Click on "ADD"

keyword: asterisk_18
leave parameter field empty
and set value=1 

In FREEPBX goto 
SETTINGS -> Advanced Settings 

enable "Display Readonly Settings" and "Override Readonly Settings"
Press SUBMIT then the read RELOAD button that appears.

Find:
POST CALL RECORDING SCRIPT and enter the value:

/usr/local/parselog/update_mix_mixmonitor.pl ^{UNIQUEID} ^{MIXMONITOR_FILENAME}

Press SUBMIT then the read RELOAD button that appears.

Should be good to go

Friday, October 6, 2017

RESET ELASTIX 2.5 GUI PASSWORD

RESET ELASTIX 2.5 GUI PASSWORD
SSH to box as root
enter the following command to reset password "letmein"
sqlite3 /var/www/db/acl.db "UPDATE acl_user SET md5_password='`echo -n letmein|md5sum|cut -d' ' -f1`' WHERE name='admin'"
Replace letmein with the password you want to use for the admin login.

Friday, September 8, 2017

Have callers approve their call being recorded in Asterisk.




This a demo, so I just used a default recording that says "this call may be monitored". You can easily replace this with one that makes more sense. "Press 1 to permit us to record this call, any other key to decline"
Pressing 1 will FORCE recording of the calls. Any other key, or if they press nothing after a couple of asks it will automatically set the recording to "NO"
This works for all calls marked as external. Internal calls I've bypassed it asking the question and set it to 'dontcare'. If you want internal extension to extension calls record, change 'dontcare' to 'force'
ASSUMPTION
You've set all call recording options in FreePBX to "DONT CARE"
Thats how i tested it. In FreePBX Distro 10.13.66
INSTALLATION
Don't test this in production environment

Open up extension_additional.conf and look for the context
[sub-record-check]
Copy that entire section (its probably about 100 lines) and ends with
;--== end of [sub-record-check] ==--;
Paste that into extensions_override_freepbx.conf
Find these two lines about 12 or so lines down.
exten => recordcheck,1,Noop(Starting recording check against ${ARG1})
exten => recordcheck,n,Goto(${ARG1})
INSERT these 4 lines in between the above two lines.
exten => recordcheck,n,GotoIf($["${CALLTYPE}" = "internal"]?dontcare)
exten => recordcheck,n,ExecIf($["${CALLTYPE}" = "external"]?Read(FOOrecord,this-call-may-be-monitored-or-recorded,1,,2,3))
exten => recordcheck,n,ExecIf($["${CALLTYPE}" = "external" | "${FOOrecord}" = "" ]?Set(ARG1=no)
exten => recordcheck,n,ExecIf($["${CALLTYPE}" = "external" | "${FOOrecord}" = "1" ]?Set(ARG1=force)
Save your changes
Reload the config
Make a test call.
CODE EXPLAINED:
Check to see if its an internal extension to extension call, we bypass it asking for permission to record and ring the phone.
exten => recordcheck,n,GotoIf($["${CALLTYPE}" = "internal"]?dontcare)
If this is an external call, we prompt the caller if they permit us to record the call. the syntax is:
READ(DTMFvariable, soundfile, max number of digits, number of times it will ask, how long it will wait for an answer
exten => recordcheck,n,ExecIf($["${CALLTYPE}" = "external"]?Read(FOOrecord,this-call-may-be-monitored-or-recorded,1,,2,3))
If the caller doesn't respond with any input, then we assume "no" and continue the call. 
exten => recordcheck,n,ExecIf($["${CALLTYPE}" = "external" | "${FOOrecord}" = "" ]?Set(ARG1=no)
If the callers presses 1, then we set the call recording to on and ring the extension
exten => recordcheck,n,ExecIf($["${CALLTYPE}" = "external" | "${FOOrecord}" = "1" ]?Set(ARG1=force)