How to Restart Management agents in ESXi Using ESXi Shell or Secure Shell (SSH)

How to Restart Management agents in ESXi Using ESXi Shell or Secure Shell (SSH).

  1. Log in to ESXi Shell or SSH as root.For Enabling ESXi Shell or SSH, see Using ESXi Shell in ESXi 5.x and 6.x

Restart the ESXi host daemon and vCenter Agent services using these commands:

/etc/init.d/hostd restart

/etc/init.d/vpxa restart

or

  • To reset the management network on a specific VMkernel interface, by default vmk0, run the command:esxcli network ip interface set -e false -i vmk0; esxcli network ip interface set -e true -i vmk0

    Note: Using a semicolon (;) between the two commands ensures the VMkernel interface is disabled and then re-enabled in succession. If the management interface is not running on vmk0, change the above command according to the VMkernel interface used.

  • To restart all management agents on the host, run the command:services.sh restart
  • original link

how to restart vmware esxi Network adapter

how to restart vmware esxi Network adapter

Login to VMware Esxi through ssh

check the network interfaces by following command .

# esxcli network nic list

----To  down your interface -----

# esxcli network nic down -n vmnicX                 X   replace X with your nic number

---To  make interface UP ---

# esxcli network nic up -n vmnicX

How to enable call forwarding from SIP extension Softphone or Analog Phone

How to enable call forwarding from SIP extension Softphone or Analog Phone if you are using Asterisk PBX or Issabel PBX .

From the Softphone or Analog Phone

Dial *72 with number where you want to forward the call for example I want to forward my all calls on

my mobile no 83199999 then i will dial  *7283199999      make sure you are able to dial outside from your phone . and add prefix which you dial for outside calls.

To Disable Call Forwarding

Dial *73

MikroTik DHCP Server configuration for multiple Networks

MikroTik DHCP Server configuration for multiple Networks

If you are having multiple Network  and want to configure DHCP server for your Networks .

Follow the steps and change the  IP Address and Interface names according to your requirement.

Here I will configure two networks for my home

1-   172.16.10.0/24   for my LAB

2- 10.34.200.0/24 for my Home

My Interfaces IP address

/ip address
add address=172.16.10.1/24 interface=ether2_lab network=172.16.10.0
add address=10.34.200.1/24 interface=ether3_home network=10.34.200.0

1- Create IP Pools for your Network

/ip pool
add name=lab ranges=172.16.10.100-172.16.10.150
add name=home ranges=10.34.200.100-10.34.200.150
add name=PPTP ranges=172.16.11.100-172.16.11.150

 

2- Create DHCP Server

/ip dhcp-server
add address-pool=lab disabled=no interface=ether2_lab name=dhcp1
add address-pool=home disabled=no interface=ether3_home name=server1

3- Create DHCP-Server Network

/ip dhcp-server network
add address=10.34.200.0/24 gateway=10.34.200.1
add address=172.16.10.0/24 gateway=172.16.10.1

how to configure sip trunk between cme and issabel

how to configure sip trunk between cme and issabel or how to configure sip trunk between cme and elastix.

Some time we require sip communication between Cisco CME and Asterisk servers to send and receive  calls to and from CME to Asterisk .

First we will configure Issabel side  with following steps. we will go through following steps .

1- Configure Trunk

2- Configure Outbound Routes

3-Inbound  Routes

Continue reading how to configure sip trunk between cme and issabel

centos 5.11 yum repository

centos 5.11 yum repository

It is now EOD no updates available. but we require yum repo to install old applications .

go to and run

cd /etc/yum.repos.d
for i in $(ls *.repo); do mv $i $i.orig; done

copy the below code and save as  CentOS-Base.repo

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the 
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://vault.centos.org/5.11/os/$basearch
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#released updates 
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://vault.centos.org/5.11/updates/$basearch
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
baseurl=http://vault.centos.org/5.11/addons/$basearch
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://vault.centos.org/5.11/extras/$basearch
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
baseurl=http://vault.centos.org/5.11/centosplus/$basearch
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
baseurl=http://vault.centos.org/5.11/contrib/$basearch
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

Source link 

 

How to check Internet Speed on Centos CLI

How to check Internet Speed on Centos CLI

Speedtest-cli is Python script  its works on Python program.

you must have Python installed. check if have installed .

python –version
python3 –version
lsb_release -a

if you have not install then install it by

# yum install python

Download the script

#wget -O speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py

#chmod +x speedtest-cli

Now check the internet speed

#./speedtest-cli

or

#python speedtest-cli

Source link 

How to block Country in Mikrotik Firewall

How to block Country in Mikrotik Firewall.

If you want to block whole country in Mikrotik firewall  visit the website https://mikrotikconfig.com/firewall/

step 1 :-  Check the countries you want included in the address list. Scroll down for additional countries.

Step 2- Click this button to generate your stand alone address list for use with your own custom rules

it will generate the firewall command with IP address . now copy and paste in Mikrotik  CLI.

 

 

 

 

 

How to reset FreePBX admin password

How to reset FreePBX admin password

If you forget the freepbx admin password  and you have  root  ssh access you can reset the admin  password .

1-  Access your login page  and press Ctrl +A

2- Copy the  unique session ID

3- Now on your SSH session type as below adn replace your unique session ID

[root@pbx ~]# fwconsole unlock igg56njsp8bi0h4serfwepsq963
Unlocking:
session unlocked!
[root@pbx ~]#

or

If you are using FreePBX 13 or earlier and the above gives you a ‘command not found’ error message, use the depreciated amportal command

[root@pbx ~]# amportal a u igg56njswewbi0h4odqnupsq963
Fetching FreePBX settings with gen_amp_conf.php..
session unlocked!
[root@pbx ~]#

4- Now refresh the login page and you will be automatically logged in.

5-  Now Go to    Admin -> Administrators and select your user on the right side of the page. At this point you can reset your password.

FreePBX firewall commands

FreePBX firewall commands

fwconsole firewall disable
fwconsole firewall stop
fwconsole firewall start
fwconsole firewall restart
fwconsole firewall trust www.google.com
fwconsole firewall untrust www.google.com
fwconsole firewall untrust 192.168.0.1/24
fwconsole firewall list blacklist
fwconsole firewall list trusted
fwconsole firewall add blacklist example.com 192.168.15.0/24
fwconsole firewall add other 192.168.75.0/24
fwconsole firewall list other
fwconsole firewall del other 192.168.75.0/24