Saturday, 3 June 2017

fortigate in vmware




### URL ###

http://www.networklab.in/2016/04/07/integrating-fortios-fortigate-vmware/

Thursday, 13 April 2017

Creating Random password using powershell

$Ragx=$NULL;For ($a=33;$a –le 126;$a++) {$Ragx+=,[char][byte]$a }

Function GET-Temppassword() {

Param(

[int]$length=10,

[string[]]$sourcedata

)



For ($loop=1; $loop –le $length; $loop++) {

            $TempPassword+=($sourcedata | GET-RANDOM)

            }

return $TempPassword

}

$Raghu = GET-Temppassword –length 3 –sourcedata $Ragx


Write-host "P@SS$($RAGHU)"

Monday, 27 March 2017

Converting AP to autonomous and configuring the AP AIR-CAP2702I-D-K9


AP00f6.6325.b4cc>
AP00f6.6325.b4cc>en
Password:

AP00f6.6325.b4cc#$oad tftp://192.168.30.117/ap3g2-k9w7-tar.153-3.JD4.tar
examining image...
Loading ap3g2-k9w7-tar.153-3.JD4.tar from 192.168.30.117 (via BVI1): !
extracting info (282 bytes)
Image info:
    Version Suffix: k9w7-.153-3.JD4
    Image Name: ap3g2-k9w7-mx.153-3.JD4
    Version Directory: ap3g2-k9w7-mx.153-3.JD4
    Ios Image Size: 10568192
    Total Image Size: 13670912
    Image Feature: WIRELESS LAN
    Image Family: AP3G2
    Wireless Switch Management Version: 8.3.112.0
MwarVersion:08037000.First AP Supported Version:07066E02.

Image version check passed

Extracting files...
ap3g2-k9w7-mx.153-3.JD4/ (directory) 0 (bytes)


extracting ap3g2-k9w7-mx.153-3.JD4/img_sign_rel_sha2.cert (1371 bytes)
extracting info.ver (282 bytes)
[OK - 13721600 bytes]



ap>
ap>en
Password:

ap(config)#fot11 ssid WLAN8
            ^
% Invalid input detected at '^' marker.

ap(config)#dot11 ssid WLAN8
ap(config-ssid)#authentication open
ap(config-ssid)#guest-mode

ap(config-ssid)#exit

ap(config)#inter dot11Radio 0
ap(config-if)#ssid WLAN8
ap(config-if)#
*Mar  1 00:05:08.843: %DOT11-5-EXPECTED_RADIO_RESET: Restarting Radio interface Dot11Radio0 due to interface reset
ap(config-if)#en

ap(config-if)#encryption mode  ciphers aes-ccm
ap(config-if)#
*Mar  1 00:05:24.343: %DOT11-5-EXPECTED_RADIO_RESET: Restarting Radio interface Dot11Radio0 due to interface reset
ap(config-if)#exit

ap(config)#inter dot11Radio 1

ap(config-if)#encryption mode  ciphers aes-ccm
ap(config-if)#
*Mar  1 00:05:43.535: %DOT11-5-EXPECTED_RADIO_RESET: Restarting Radio interface Dot11Radio1 due to interface resetssid WLAN8
ap(config-if)#
*Mar  1 00:05:51.335: %DOT11-5-EXPECTED_RADIO_RESET: Restarting Radio interface Dot11Radio1 due to interface reset
ap(config-if)#exit
ap(config)#dot11 ssid WLAN8


ap(config-ssid)#authentication key-management wpa ?
  cckm     allow CCKM clients
  version  Specify WPA version
  <cr>


ap(config-ssid)#authentication key-management wpa version 2
ap(config-ssid)#
*Mar  1 00:06:43.795: %DOT11-5-EXPECTED_RADIO_RESET: Restarting Radio interface Dot11Radio1 due to interface reset
*Mar  1 00:06:43.795: %DOT11-5-EXPECTED_RADIO_RESET: Restarting Radio interface Dot11Radio0 due to interface reset
ap(config-ssid)#
ap(config-ssid)#au
ap(config-ssid)#en

ap(config-ssid)#wpa-psk ascii ?
  0     Specifies an UNENCRYPTED key will follow
  7     Specifies a HIDDEN key will follow
  LINE  Clear WPA password

ap(config-ssid)#wpa-psk ascii 0 ?
  LINE  Clear WPA password

ap(config-ssid)#wpa-psk ascii 0 OrranGE@123
ap(config-ssid)#
*Mar  1 00:07:34.495: %DOT11-5-EXPECTED_RADIO_RESET: Restarting Radio interface Dot11Radio1 due to interface reset
*Mar  1 00:07:34.495: %DOT11-5-EXPECTED_RADIO_RESET: Restarting Radio interface Dot11Radio0 due to interface reset
ap(config-ssid)#

ap(config-ssid)#exit
ap(config)#exit
ap#
*Mar  1 00:07:46.575: %SYS-5-CONFIG_I: Configured from console by consolewr
Building configuration...
[OK]
ap#sh ip int br
Interface                  IP-Address      OK? Method Status                Protocol
BVI1                       192.168.44.56   YES DHCP   up                    up
Dot11Radio0                unassigned      YES unset  administratively down down
Dot11Radio1                unassigned      YES unset  administratively down down
GigabitEthernet0           unassigned      YES TFTP   up                    up
GigabitEthernet1           unassigned      YES TFTP   up                    down
ap#conf ter
Enter configuration commands, one per line.  End with CNTL/Z.

ap(config)#inter dot11Radio  0
ap(config-if)#no shut
ap(config-if)#
*Mar  1 00:08:04.343: %DOT11-5-EXPECTED_RADIO_RESET: Restarting Radio interface Dot11Radio0 due to interface reset
*Mar  1 00:08:04.347: %LINK-5-CHANGED: Interface Dot11Radio0, changed state to reset
*Mar  1 00:08:05.431: %DOT11-6-FREQ_SCAN: Interface Dot11Radio0, Scanning frequencies for 11 secondsexit
ap(config)#inter do 1
ap(config-if)#no shut
ap(config-if)#
*Mar  1 00:08:13.359: %DOT11-5-EXPECTED_RADIO_RESET: Restarting Radio interface Dot11Radio1 due to interface reset
*Mar  1 00:08:13.363: %LINK-5-CHANGED: Interface Dot11Radio1, changed state to reset
ap(config-if)#

*Mar  1 00:08:18.235: %DOT11-5-EXPECTED_RADIO_RESET: Restarting Radio interface Dot11Radio1 due to configuration change
*Mar  1 00:08:18.243: %DOT11-6-FREQ_USED: Interface Dot11Radio1, frequency 5825 selected
*Mar  1 00:08:18.255: %LINK-6-UPDOWN: Interface Dot11Radio1, changed state to up
*Mar  1 00:08:18.263: %LINK-6-UPDOWN: Interface Dot11Radio1, changed state to downt
ap(config)#
*Mar  1 00:08:18.271: %LINK-5-CHANGED: Interface Dot11Radio1, changed state to reset
*Mar  1 00:08:19.299: %LINK-6-UPDOWN: Interface Dot11Radio1, changed state to up
*Mar  1 00:08:20.299: %LINEPROTO-5-UPDOWN: Line protocol on Interface Dot11Radio1, changed state to up
ap(config)#
ap(config)#
*Mar  1 00:08:22.431: %DOT11-5-EXPECTED_RADIO_RESET: Restarting Radio interface Dot11Radio0 due to configuration change
*Mar  1 00:08:22.439: %DOT11-6-FREQ_USED: Interface Dot11Radio0, frequency 2452 selected
*Mar  1 00:08:22.451: %LINK-6-UPDOWN: Interface Dot11Radio0, changed state to up
*Mar  1 00:08:22.459: %LINK-6-UPDOWN: Interface Dot11Radio0, changed state to downex
*Mar  1 00:08:22.467: %LINK-5-CHANGED: Interface Dot11Radio0, changed state to resetit
ap#
*Mar  1 00:08:23.495: %LINK-6-UPDOWN: Interface Dot11Radio0, changed state to up
*Mar  1 00:08:24.091: %SYS-5-CONFIG_I: Configured from console by console
*Mar  1 00:08:24.495: %LINEPROTO-5-UPDOWN: Line protocol on Interface Dot11Radio0, changed state to up
ap#sh ip int br
Interface                  IP-Address      OK? Method Status                Protocol
BVI1                       192.168.44.56   YES DHCP   up                    up
Dot11Radio0                unassigned      YES unset  up                    up
Dot11Radio1                unassigned      YES unset  up                    up
GigabitEthernet0           unassigned      YES TFTP   up                    up
GigabitEthernet1           unassigned      YES TFTP   up                    down
ap#wr
Building configuration...
[OK]
ap#show dot11 ass
ap#
*Mar  1 00:08:50.359: %DOT11-6-ASSOC: Interface Dot11Radio1, Station   8879.7e2a.6922 Associated KEY_MGMT[WPAv2 PSK]
ap#
ap#
ap#show dot11 ass

802.11 Client Stations on Dot11Radio1:

SSID [WLAN8] :

MAC Address    IP address      IPV6 address                           Device        Name            Parent         State
8879.7e2a.6922 192.168.44.62   ::                                     unknown       -               self           Assoc

ap#wr
Building configuration...
[OK]
ap#

Wednesday, 11 January 2017

Powershell Script to check file exist or not ([IO.Directory])

if([IO.Directory]::Exists($DestinationPath1))
{
write-output "Destination folder exists"
}
else
{
$DestinationPath1= New-item -type directory D:\**\$(get-date -f dd.MM.yyyy)\ -ErrorAction SilentlyContinue                      
}

Powershell to create log file


##LOGFILE CREATION

$LogFile = "D:\**.log"
function Logw([string]$var)
    {
    $Date =(Get-date).ToString();
    $Date + $var | out-file $LogFile -append -encoding utf8
    }

PowerShell Creating Time Stamp with date


##TIMESTAMP CREATION

$ScripName = "   "
$ydt = get-date -date $(get-date).adddays(-1) -format yyyyMMdd
$dt = date -f yyyyMMdd
$timeStamp= $(get-date -f MM-dd-yyyy_HH_mm_ss)
$path = "D:\\LOGS\$timeStamp"
if([IO.Directory]::Exists($path))
{
write-output "The folder exists"
}
else
{
$folCreate= New-item -type directory D:\LOGS\$(get-date -f MM-dd-yyyy_HH_mm_ss)
}

Monday, 9 January 2017

Dynamically specifying source location for Hyperlink in excel


TO FIND LOCATION OF EXCEL FILE :

=MID(CELL("filename"),1,FIND("[",CELL("filename"))-1)

CONCATENATING FILE LOCATION AND FILE NAME:

=HYPERLINK(P10&"index.html")

Git

1 git add ↳ It lets you add changes from the working directory into the staging area 2 git commit ↳ It lets you save a snapshot of currently...