Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
# -------------------------------------------------
# Infiworx Docker Project
# Govind Kumar < govind.sharma@live.com>
# -------------------------------------------------
set -o nounset
cd /usr/local/src/
echo "dowloading python latest version"
@govind0229
govind0229 / Capturing SIP and RTP traffic using tcpdump.md
Last active May 1, 2022 05:14
Capturing SIP and RTP traffic using TcpDump

Capturing SIP and RTP traffic using TcpDump

  • Tcpdump is a command-line packet analyzer, It has a lot of cool features to capture the network traffic. Let’s see the command to capture the SIP and RTP traffic using the Tcpdump.

Capturing only SIP traffic using the Tcpdump:

 tcpdump -i any -n -s 0 port 5060 -vvv -w /tmp/capture_file_name.pcap

Installing FreeSWITCH 1.10.5 on Ubuntu 18.04 | Ubuntu 20.04 LTS

Introduction

FreeSWITCH is a software defined telecom stack that runs on any commodity hardware. FreeSWITCH can handle voice, video and text communication and support all popullar VoIP protocols. FreeSWITCH is flexible and modular, and can be used in any way you can imagine

This guide demonstrates how to get it install FreeSWITCH and get it up and running on a Ubuntu 20.04 LTS machine

Prerequisites

To follow along with this guide, you need one Ubuntu 20.04 LTS server which has prerequisite packages installed and configured. In order to install required packages issue following command

@govind0229
govind0229 / configureODBC.sh
Created March 10, 2021 17:32 — forked from dgershman/configureODBC.sh
Used for configuring ODBC for FreeSWITCH
while true; do
read -p "If you already have compiled FreeSWITCH you will need to manually edit the configure file to set enable_core_odbc_support=yes, are you sure you want to continue? (y/n)" yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit;;
* ) echo "Please answer yes to continue to installing ODBC and compiling FreeSWITCH, answer no to abort this process.";;
esac
done
yum -y install unixODBC-devel mysql-connector-odbc
@govind0229
govind0229 / http2_apache2_ubuntu16.04.md
Created January 11, 2021 15:19 — forked from GAS85/http2_apache2_ubuntu16.04.md
How to Enable HTTP/2 in Apache 2.4 on Ubuntu 16.04

Requirements

  • A self-managed VPS or dedicated server with Ubuntu 16.04 running Apache 2.4.xx.
  • For Ubuntu 18.04 please read here --> https://gist.github.com/GAS85/8dadbcb3c9a7ecbcb6705530c1252831
  • A registered domain name with working HTTPS (TLS/SSL). HTTP/2 only works alongside HTTPS because most browsers, including Firefox and Chrome, don’t support HTTP/2 in cleartext (non-TLS) mode.
@govind0229
govind0229 / How to replace faulty hard-disk into Software Raid1.md
Last active January 9, 2021 18:01
How to replace faulty hard-disk into Software Raid1.
@govind0229
govind0229 / Varnish + Hitch cache.md
Last active October 17, 2022 01:08
How to Install Varnish + Hitch Cache for Apache on CentOS/RHEL8

How to Install Varnish + Hitch Cache for Apache on CentOS/RHEL8

  • Varnish Cache is a free open source, modern and high-performance web application accelerator. It is a fast reverse HTTP proxy that caches content to speed up your web server performance, by storing web content in server memory – in a cache. It is configured to run in front of an origin server such as Apache (HTTPD) webserver.

Hitch and varnish workflow

Step 1: Installing Apache Web Server.

@govind0229
govind0229 / Resize root partition.md
Last active December 21, 2020 12:00
Resize root partition (or how to delete the default /home partition) on CentOS 8 through SSH

Resize root partition (or how to delete the default /home partition) on CentOS 8 through SSH

This requires you to be able to ssh into the instance using the root user account and that no services be running as users out of /home on the target machine.

The examples are from a default installation with no customation-you NEED to know what you're working with for volumes/partitions to not horribly break things.

By default, CentOS 8 uses XFS for the file system and Logical Volume Manager (LVM), creating 3 partitions: /,/home and /boot

Step 1 - Copy /home Contents

  • To backup the contents of /home, do the following:
@govind0229
govind0229 / Postgresql connection exceeded issue solve.md
Last active December 21, 2020 10:38
Postgresql connection exceeded issue solve

Postgresql

Bash psql -U postgres -c 'SHOW config_file' psql -U postgres -c 'SHOW config_file' psql -U postgres -c 'SHOW max_connections' `bash

systemctl restart postgresql-12.service

`

@govind0229
govind0229 / The check file differs from the remote server using ssh commands.md
Last active December 21, 2020 11:39
The check file differs from the remote server using ssh commands.

Compare remote server file using ssh commands

# ssh user@remote-host "cat /home/root/file_remote" | diff  - file_local 

# ssh -P<port> -l root <remote server ip> "cat  /home/root/file_remote" | diff - /home/root/local_server_file
enter password 
	> 
		diff will
	&lt;