Install Debian Package *.deb

#dpkg -i webmin_2.202_all.deb

Sudo Users

root@server:/home/teee# apt-get install sudo
root@server:/etc# ee /etc/sudoers

#User privilege specification

root ALL=(ALL:ALL) ALL
sudo(user) ALL=(ALL:ALL) ALL

Test Login :
Login : (User)
$ sudo -s (User Password)

Debian Static IP

root@server:/# ee /etc/network/interfaces

allow-hotplug ens33
iface ens33 inet static
address 192.168.100.xx
netmask 255.255.255.0
gateway 192.168.100.1
dns-nameservers 8.8.8.8

root@server:/#systemctl restart networking.service

SSH Change Port and Allow Users

root@server:/etc/ssh# ee sshd_config

#Port (change this)

AllowUsers (User)
root@server:/etc/ssh# /etc/init.d/ssh reload

LACP (Link Aggregation Control Protocol)

LACP (Link Aggregation Control Protocol) เป็นโปรโตคอลมาตรฐานที่กำหนดโดย IEEE 802.3ad สำหรับการรวมลิงก์ (link aggregation) หรือที่เรียกอีกอย่างว่า “port channel” หรือ “EtherChannel” ซึ่งทำให้สามารถรวมหลายพอร์ตในสวิตช์หรือเราเตอร์เข้าด้วยกันเพื่อเพิ่มความสามารถในการรับส่งข้อมูล (bandwidth) และเพิ่มความน่าเชื่อถือ (redundancy) ของการเชื่อมต่อเครือข่าย

คุณสมบัติของ LACP:

  1. การรวมลิงก์ (Link Aggregation):
    • LACP ช่วยให้สามารถรวมพอร์ตหลายพอร์ตเข้าด้วยกันเพื่อสร้างลิงก์เสมือน (virtual link) ที่มีความสามารถในการรับส่งข้อมูลมากขึ้น เนื่องจากการรับส่งข้อมูลสามารถแบ่งออกไปตามพอร์ตที่รวมกัน
  2. ความน่าเชื่อถือ (Redundancy):
    • หากหนึ่งในพอร์ตที่รวมอยู่เกิดปัญหา การรับส่งข้อมูลสามารถเปลี่ยนไปใช้อีกพอร์ตหนึ่งที่ยังทำงานอยู่ได้โดยอัตโนมัติ ทำให้การเชื่อมต่อมีความน่าเชื่อถือสูงขึ้น
  3. การจัดการและการตรวจสอบพอร์ต (Port Management):
    • LACP ช่วยให้สามารถตรวจสอบและจัดการพอร์ตในกลุ่ม aggregation ได้อย่างมีประสิทธิภาพ เช่น การเพิ่มหรือลบพอร์ตออกจากกลุ่มโดยไม่กระทบต่อการทำงานของเครือข่าย
  4. การกำหนดค่าอัตโนมัติ:
    • LACP สามารถกำหนดค่าอัตโนมัติระหว่างอุปกรณ์เครือข่ายที่รองรับ LACP โดยอุปกรณ์ทั้งสองจะทำการเจรจาต่อรองเพื่อกำหนดพอร์ตที่ต้องการรวมเข้าด้วยกัน ทำให้การตั้งค่าเครือข่ายทำได้ง่ายขึ้น

การใช้งาน:

LACP ถูกใช้งานอย่างแพร่หลายในเครือข่ายที่ต้องการเพิ่มประสิทธิภาพและความน่าเชื่อถือ เช่น ในการเชื่อมต่อระหว่างสวิตช์หลัก (core switch) หรือระหว่างสวิตช์กับเซิร์ฟเวอร์ โดยจะใช้ในการสร้างลิงก์ความเร็วสูงที่มีความเสถียรและสามารถจัดการกับการล้มเหลวของพอร์ตได้อย่างรวดเร็ว

สรุปแล้ว LACP เป็นเครื่องมือที่สำคัญในการปรับปรุงความสามารถและความน่าเชื่อถือของเครือข่าย โดยเฉพาะในสภาพแวดล้อมที่ต้องการการเชื่อมต่อที่มีประสิทธิภาพสูง

Aruba VSF vs VSX vs VRF คืออะไร

Aruba VSF (Virtual Switching Framework), VSX (Virtual Switching Extension), และ VRF (Virtual Routing and Forwarding) เป็นเทคโนโลยีเครือข่ายที่ใช้ในสวิตช์ของ Aruba เพื่อตอบสนองความต้องการต่างๆ ในการจัดการเครือข่าย โดยแต่ละเทคโนโลยีมีความแตกต่างกันดังนี้:

  1. VSF (Virtual Switching Framework):
    • การใช้งาน: VSF ใช้สำหรับการเชื่อมต่อสวิตช์หลายๆ ตัวเข้าด้วยกันเพื่อให้ทำงานเหมือนเป็นสวิตช์ตัวเดียว โดยการรวมตัวของสวิตช์เหล่านี้จะช่วยเพิ่มความสามารถในการขยายเครือข่ายและความน่าเชื่อถือ (redundancy)
    • ข้อดี: ช่วยให้สามารถขยายเครือข่ายได้ง่ายและมีความยืดหยุ่นสูง โดยไม่ต้องเปลี่ยนแปลงการตั้งค่าในระดับ Access Layer
    • การทำงาน: สวิตช์ในกลุ่ม VSF จะถูกควบคุมผ่านสวิตช์ตัวแม่ (Primary) ที่ทำหน้าที่ควบคุมสวิตช์อื่นๆ ที่เชื่อมต่ออยู่
  2. VSX (Virtual Switching Extension):
    • การใช้งาน: VSX ถูกออกแบบมาเพื่อตอบสนองความต้องการในการจัดการเครือข่ายที่มีความน่าเชื่อถือสูง โดยการสร้างการเชื่อมต่อสวิตช์คู่ (dual switch) ที่ทำงานร่วมกัน แต่ยังคงทำงานเป็นสวิตช์แยกกันในบางฟังก์ชัน
    • ข้อดี: ให้การทำงานที่มีความต่อเนื่องสูง (high availability) โดยที่ถ้าสวิตช์ตัวใดตัวหนึ่งล้มเหลว (failover) อีกตัวหนึ่งยังคงทำงานได้ ทำให้ไม่กระทบต่อการทำงานของเครือข่ายโดยรวม
    • การทำงาน: สวิตช์ใน VSX จะมีการแบ่งหน้าที่กันทำงานแบบ Active-Active และมีการซิงค์ข้อมูลระหว่างกันเพื่อให้เกิดความต่อเนื่องในการทำงาน
  3. VRF (Virtual Routing and Forwarding):
    • การใช้งาน: VRF ใช้สำหรับการแบ่งเส้นทางการรับส่งข้อมูล (routing) บนสวิตช์หรือเราเตอร์ให้สามารถแยกออกจากกันได้ในเครือข่ายเดียวกัน โดยที่ VRF แต่ละอันจะมี routing table แยกกัน
    • ข้อดี: ช่วยให้สามารถแยกเครือข่ายแบบ logic ได้ในองค์กรหรือสภาพแวดล้อม multi-tenant โดยไม่ต้องใช้ฮาร์ดแวร์เพิ่มเติม
    • การทำงาน: VRF จะสร้าง routing table แยกต่างหากสำหรับแต่ละ instance ที่กำหนด ทำให้สามารถใช้เส้นทางการรับส่งข้อมูลที่แยกออกจากกันได้

ทั้งสามเทคโนโลยีนี้มีความสำคัญในการจัดการเครือข่ายระดับองค์กร ขึ้นอยู่กับความต้องการและรูปแบบของเครือข่ายที่ต้องการจะนำไปใช้

Install FreePBX 15 on CentOS 7

Ref. https://wiki.freepbx.org/display/FOP/Installing+FreePBX+14+on+CentOS+7

1.Disable SELinux

sed -i ‘s/(^SELINUX=).*/\SELINUX=disabled/’ /etc/sysconfig/selinux

sed -i ‘s/(^SELINUX=).*/\SELINUX=disabled/’ /etc/selinux/config

[root@ippbx selinux]# sestatus
SELinux status: disabled

2.CentOS system and Install Development Tools
[root@ippbx ~]# yum -y groupinstall core base “Development Tools”
[root@ippbx ~]# adduser asterisk -m -c “Asterisk User”
[root@ippbx ~]#yum -y install firewalld
[root@ippbx ~]# systemctl unmask firewalld
[root@ippbx ~]# vi /etc/firewalld/zones/public.xml


[root@ippbx selinux]# firewall-cmd –reload
success
[root@ippbx selinux]# systemctl start firewalld

3.Install other required dependencies
[root@ippbx selinux]# yum -y install dnf lynx tftp-server unixODBC mariadb-server mariadb mysql-connector-odbc httpd ncurses-devel sendmail sendmail-cf newt-devel libxml2-devel libtiff-devel gtk2-devel subversion git wget vim uuid-devel sqlite-devel net-tools gnutls-devel texinfo libuuid-devel libedit-devel
[root@ippbx selinux]# dnf install -y epel-release
[root@ippbx ~]# dnf install -y python3-devel

4.Install MariaDB Database server
[root@ippbx ~]# systemctl enable mariadb.service
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
[root@ippbx ~]# systemctl start mariadb
Enter current password for root (enter for none):Enter
Set root password? [Y/n] y
New password:xxxxx
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n]y
Remove test database and access to it? [Y/n]y
Reload privilege tables now? [Y/n] y
[root@ippbx ~]# netstat -lntup
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:9696 0.0.0.0:* LISTEN 30039/sshd
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 31088/mysqld
tcp6 0 0 :::9696 :::* LISTEN 30039/sshd

5.Installing Node.js
[root@ippbx ~]# curl -sL https://rpm.nodesource.com/setup_12.x | bash –
[root@ippbx ~]# dnf install -y nodejs
[root@ippbx ~]# node -v
v12.22.11

6.Install and configure Apache Web Server
[root@ippbx ~]# yum -y install httpd
[root@ippbx ~]# systemctl enable httpd.service
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
[root@ippbx ~]# systemctl start httpd.service
change Apache user to asterisk and turn on AllowOverride option :
[root@ippbx ~]# cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf_orig
[root@ippbx ~]# sed -i ‘s/^(User|Group).*/\1 asterisk/’ /etc/httpd/conf/httpd.conf
[root@ippbx ~]# sed -i ‘s/AllowOverride None/AllowOverride All/’ /etc/httpd/conf/httpd.conf
[root@ippbx src]# systemctl restart httpd.service

Remove default index.html page
[root@ippbx ~]# rm -f /var/www/html/index.html

7.Install PHP and required extensions
[root@ippbx ~]# yum -y install wget php php-pear php-cgi php-common php-curl php-mbstring php-gd php-mysql php-gettext php-bcmath php-zip php-xml php-imap php-json php-process php-snmp

[root@ippbx ~]# pear install Console_Getopt

8.Download Source
[root@ippbx ~]# cd /usr/src/
[root@ippbx src]# wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-15.0-latest.tgz
[root@ippbx src]# wget https://ftpmirror.gnu.org/libtool/libtool-2.4.6.tar.gz
[root@ippbx src]# wget http://digip.org/jansson/releases/jansson-2.13.tar.gz
[root@ippbx src]# wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
[root@ippbx src]# wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-current.tar.gz

Install Libtools
[root@ippbx src]# tar xvf libtool-2.4.6.tar.gz
[root@ippbx src]# cd libtool-2.4.6
[root@ippbx libtool-2.4.6]# ./configure
[root@ippbx libtool-2.4.6]# make install

9.Compile and install DAHDI
If you don’t have any physical PSTN hardware attached to this machine, you don’t need to install DAHDI (For example, a T1 or E1 card, or a USB device). Most smaller setups will not have DAHDI hardware, and this step can be safely skipped.
http://downloads.asterisk.org/pub/telephony
/

[root@ippbx src]# tar xvf dahdi-linux-complete-current.tar.gz
[root@ippbx src]# cd dahdi-linux-complete-*

[root@ippbx dahdi-linux-complete-3.1.0+3.1.0]# make
make -C linux all
make[1]: Entering directory /usr/src/dahdi-linux-complete-3.1.0+3.1.0/linux' make -C drivers/dahdi/firmware firmware-loaders make[2]: Entering directory/usr/src/dahdi-linux-complete-3.1.0+3.1.0/linux/drivers/dahdi/firmware’
make[2]: Leaving directory /usr/src/dahdi-linux-complete-3.1.0+3.1.0/linux/drivers/dahdi/firmware' You do not appear to have the sources for the 3.10.0-1160.53.1.el7.x86_64 kernel installed. make[1]: *** [modules] Error 1 make[1]: Leaving directory/usr/src/dahdi-linux-complete-3.1.0+3.1.0/linux’
make: *** [all] Error 2

Install Development package for building kernel modules to match the kernel
[root@ippbx dahdi-linux-complete-3.1.0+3.1.0]# yum search kernel-*
[root@ippbx dahdi-linux-complete-3.1.0+3.1.0]#reboot

[root@ippbx]# cd /usr/src/dahdi-linux-complete-*
[root@ippbx dahdi-linux-complete-3.1.0+3.1.0]# make install
[root@ippbx dahdi-linux-complete-3.1.0+3.1.0]# make install-config

[root@ippbx dahdi-linux-complete-3.1.0+3.1.0]# cd /usr/src/libpri-1.6.0/
[root@ippbx src]# tar xvf libpri-current.tar.gz
[root@ippbx src]# cd libpri-1.6.0/
[root@ippbx libpri-1.6.0]# make
[root@ippbx libpri-1.6.0]# make install

10.Compile and Install jansson
[root@ippbx libpri-1.6.0]# cd /usr/src
[root@ippbx src]# tar xvf jansson-2.13.tar.gz
[root@ippbx src]# cd jansson-2.13/
[root@ippbx jansson-2.13]# autoreconf -i
[root@ippbx jansson-2.13]# ./configure –libdir=/usr/lib64
[root@ippbx jansson-2.13]# make
make all-recursive
make[1]: Entering directory /usr/src/jansson-2.13' Making all in doc make[2]: Entering directory/usr/src/jansson-2.13/doc’
make[2]: Nothing to be done for all'. make[2]: Leaving directory/usr/src/jansson-2.13/doc’
Making all in src
make[2]: Entering directory /usr/src/jansson-2.13/src' /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -Wshadow -Wno-format-truncation -g -O2 -MT dump.lo -MD -MP -MF .deps/dump.Tpo -c -o dump.lo dump.c libtool: Version mismatch error. This is libtool 2.4.6.42-b88ce-dirty, but the libtool: definition of this LT_INIT comes from libtool 2.4.2. libtool: You should recreate aclocal.m4 with macros from libtool 2.4.6.42-b88ce-dirty libtool: and run autoconf again. make[2]: *** [dump.lo] Error 63 make[2]: Leaving directory/usr/src/jansson-2.13/src’
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/jansson-2.13′
make: *** [all] Error 2

[root@ippbx jansson-2.13]# autoreconf -fvi
autoreconf: Entering directory .' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force autoreconf: configure.ac: tracing autoreconf: running: libtoolize --copy --force libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR,.’.
libtoolize: copying file ./ltmain.sh' libtoolize: Consider addingAC_CONFIG_MACRO_DIR([m4])’ to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding -I m4' to ACLOCAL_AMFLAGS in Makefile.am. autoreconf: running: /usr/bin/autoconf --force autoreconf: running: /usr/bin/autoheader --force autoreconf: running: automake --add-missing --copy --force-missing autoreconf: Leaving directory.’

[root@ippbx jansson-2.13]# autoreconf -i
libtoolize: Consider adding AC_CONFIG_MACRO_DIR([m4])' to configure.ac and libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree. libtoolize: Consider adding-I m4′ to ACLOCAL_AMFLAGS in Makefile.am.

[root@ippbx jansson-2.13]# vi configure.ac
AC_CONFIG_MACRO_DIR([m4]) <–Add this line
(save)
[root@ippbx jansson-2.13]# vi Makefile.am
EXTRA_DIST = CHANGES LICENSE README.rst CMakeLists.txt cmake android examples
SUBDIRS = doc src test
ACLOCAL_AMFLAGS = -I m4 <–Add this line
(save)

[root@ippbx jansson-2.13]# autoreconf -i
[root@ippbx jansson-2.13]# ./configure –libdir=/usr/lib64
[root@ippbx jansson-2.13]# make
[root@ippbx jansson-2.13]# make install
[root@ippbx jansson-2.13]# ls /usr/lib64/libjansson.
libjansson.a libjansson.la libjansson.so libjansson.so.4 libjansson.so.4.10.0 libjansson.so.4.12.0

  1. Compile and install Asterisk
    [root@ippbx src]# tar xvf asterisk-16-current.tar.gz
    [root@ippbx src]# cd asterisk-*
    [root@ippbx asterisk-16.24.1]# contrib/scripts/install_prereq install
    [root@ippbx asterisk-16.24.1]# ./configure –libdir=/usr/lib64 –with-pjproject-bundled –with-crypto –with-ssl=ssl –with-srtp
    configure: Menuselect build configuration successfully completed .

[root@ippbx asterisk-16.24.1]# make menuselect
Add-On
[x]format_mp3
Applications
[x]app_macro
[Save&Exit]

[root@ippbx asterisk-16.24.1]# make
[root@ippbx asterisk-16.24.1]# contrib/scripts/get_mp3_source.sh
[root@ippbx asterisk-16.24.1]# make install
[root@ippbx asterisk-16.24.1]# make config
[root@ippbx asterisk-16.24.1]# ldconfig
[root@ippbx asterisk-16.24.1]# chkconfig asterisk off

Set Asterisk ownership permissions.
[root@ippbx asterisk-16.24.1]# chown asterisk. /var/run/asterisk
[root@ippbx asterisk-16.24.1]# chown -R asterisk. /etc/asterisk
[root@ippbx asterisk-16.24.1]# chown -R asterisk. /var/{lib,log,spool}/asterisk
[root@ippbx asterisk-16.24.1]# chown -R asterisk. /usr/lib64/asterisk
[root@ippbx asterisk-16.24.1]# chown -R asterisk. /var/www/

Install and Configure FreePBX
Change php maximum file upload size:
[root@ippbx asterisk-16.24.1]# sed -i ‘s/(^upload_max_filesize = )./\120M/’ /etc/php.ini [root@ippbx asterisk-16.24.1]# sed -i ‘s/^(User|Group)./\1 asterisk/’ /etc/httpd/conf/httpd.conf
[root@ippbx asterisk-16.24.1]# sed -i ‘s/AllowOverride None/AllowOverride All/’ /etc/httpd/conf/httpd.conf
[root@ippbx asterisk-16.24.1]# systemctl restart httpd.service

  1. Install FreePBX.
    [root@ippbx asterisk-16.24.1]# cd /usr/src
    [root@ippbx src]# tar xvf freepbx-15.0-latest.tgz
    [root@ippbx src]# cd freepbx
    [root@ippbx freepbx]# ./start_asterisk start
    STARTING ASTERISK
    Asterisk Started

[root@ippbx freepbx]#netstat -lntup
Show Asterisk Process must started
Check If Asterisk not start

[root@ippbx freepbx]# asterisk -cvvvvv
[Mar 22 03:23:23] ERROR[1954]: logger.c:1985 init_logger: Errors detected in logger.conf. Default console logging is being used.
Asterisk Dynamic Loader Starting:
[Mar 22 03:23:23] WARNING[1954]: loader.c:2224 loader_config_init: ‘modules.conf’ invalid or missing.
[Mar 22 03:23:23] ERROR[1954]: asterisk.c:3935 check_init: Module initialization failed. ASTERISK EXITING!
[root@ippbx asterisk-16.24.1]# cd configs/samples/
[root@ippbx samples]# cp modules.conf.sample /etc/asterisk/modules.conf
[root@ippbx samples]# cp logger.conf.sample /etc/asterisk/logger.conf
[root@ippbx samples]# chown -R asterisk. /etc/asterisk/*
[root@ippbx samples]# asterisk -cvvvvv
Asterisk already running on /var/run/asterisk/asterisk.ctl. Use ‘asterisk -r’ to connect.

[root@ippbx freepbx]# ./install -n –dbuser root –dbpass (YourPassword)
FreePBX Requires PHP Version 5.6 or Higher, you have: 5.4.16


[root@ippbx freepbx]# yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
[root@ippbx freepbx]# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
[root@ippbx freepbx]# yum install yum-utils
[root@ippbx freepbx]# yum-config-manager –enable remi-php56
[root@ippbx freepbx]# yum remove php*
[root@ippbx freepbx]# yum install php56w php56w-pdo php56w-mysql php56w-mbstring php56w-pear php56w-process php56w-xml php56w-opcache php56w-ldap php56w-intl php56w-soap Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
[root@ippbx freepbx]# php -v
[root@ippbx freepbx]# netstat -lntup

IF You have successfully installed FreePBX
Open Web Browser and config your administrator password

http://IPADDRESS/admin/config.php

[root@ippbx modprobe.d]# ee /etc/php.ini
memory_limit = 256M

[root@freepbx freepbx]# fwconsole restart

Install ISSABEL PBX on CENTOS 7

  • #yum update
    #yum -y install wget
    #wget http://repo.issabel.org/issabel4-netinstall.sh
  • #chmod +x issabel4-netinstall.sh
  • #./ issabel4-netinstall.sh

CentOS 7 Set time zone

[root@fs network-scripts]# ls -l /etc/localtime
lrwxrwxrwx. 1 root root 25 Nov 14 11:55 /etc/localtime -> ../usr/share/zoneinfo/UTC

[root@fs network-scripts]# timedatectl list-timezones

[root@fs network-scripts]# timedatectl set-timezone Asia/Bangkok

[root@fs network-scripts]# rm -rf /etc/localtime

[root@fs network-scripts]# ln -s /usr/share/zoneinfo/Asia/Bangkok /etc/localtime

[root@fs network-scripts]# date
Fri Mar 11 14:52:19 +07 2022

Disable IPv6 in kernel module (requires reboot) CentOS7

Check IP V6 Interface

[root@fs teee]# ip addr show | grep net6
inet6 ::1/128 scope host
inet6 fe80::1097:73ff:fe6e:9d73/64 scope link
inet6 fe80::504d:83ff:fe2b:962/64 scope link

[root@fs teee]# ee /etc/default/grub
GRUB_TIMEOUT=1
GRUB_DISTRIBUTOR=”$(sed ‘s, release .*$,,g’ /etc/system-release)”
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL=”serial console”
GRUB_CMDLINE_LINUX=”ipv6.disable=1 crashkernel=auto rhgb quiet”
GRUB_SERIAL_COMMAND=”serial”
GRUB_CMDLINE_LINUX=”console=tty0 crashkernel=auto net.ifnames=0 console=ttyS0″
GRUB_DISABLE_RECOVERY=”true”

Rebuilt GRUB

[root@fs teee]# grub2-mkconfig -o /boot/grub2/grub.cfg

[root@fs teee]# ee /etc/sysctl.conf

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

<SAVE>
[root@fs teee]# sysctl -p
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

SSH

[root@fs teee]# ee /etc/ssh/sshd_config
Port xxxx
AddressFamily inet