Netstat Commands for DDoS Checking

Useful commands to check if a server is getting ddos’d Show IPs with more than 10 connections open: Show # of connections open per IP Number of connections per IP Haynie’s version(better sorting): Drop ips with 100 or more connections: Graphic netstat connections(# of connections open per host) # netstat -an | grep ESTABLISHED | … Read more

Change Hostname in CentOS

Open the /etc/sysconfig/network file with your favorite text editor. Modify the HOSTNAME= value to match your FQDN host name. # nano /etc/sysconfig/network HOSTNAME=myserver.domain.com Change the host that is associated to your main IP address for your server, this is for internal networking (found at /etc/hosts): nano /etc/hosts 192.xx.xx.xx myserver.domain.com Hostname The ‘hostname’ command will let … Read more

How to Check an IP Address, Routes and links

To get the depth information of your network interfaces like IP Address, MAC Address information, use the following command as shown below. # ip addr show $ sudo ip addr show ]# ip addr show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 … Read more

How to Setup networking on centos 7

Source: http://www.krizna.com/centos/setup-network-centos-7/ When installing Centos 7, You may not able to connect network in that machine. This will happen because Ethernet interfaces are not enabled by default and need additional configuration. Type “nmcli d” command in your terminal # nmcli d Recommended for beginners Step 1 » Type this command “nmtui” to open Network manager … Read more

Install and Using TCPDUMP on Debian 10

Install tcpdump $ sudo apt install tcpdump -y List Network Interfaces $ sudo tcpdump -D Output 1.eth0 [Up, Running] 2.eth1 [Up, Running] 3.any (Pseudo-device that captures on all interfaces) [Up, Running] 4.lo [Up, Running, Loopback] 5.nflog (Linux netfilter log (NFLOG) interface) 6.nfqueue (Linux netfilter queue (NFQUEUE) interface) Capture packets from a particular ethernet interface using … Read more

Outbound Networking issues

Sometimes the resolvers in the server cannot find a server. You can update the DNS resolvers (/etc/resolv.conf) to rotate between a number of nameservers to try and resolve the issue. Add google nameservers to the mix with your Host resolvers. # nano /etc/redolv.conf nameserver 8.8.8.8 nameserver 69.xx.xx.xx nameserver 8.8.4.4 nameserver 69.xx.xx.xx

Change the gateway in CentoS

Edit the netowrk file # nano /etc/sysconfig/network You should see this: HOSTNAME=host.domain.com # ============================================================= # Network Script generated by BareMetal # ============================================================= NETWORKING=yes NETWORKING_IPV6=no GATEWAY=216.xx.xx.1 Change the Gateway and save then restart networking # service network restart

Changing the primary IP address of a CentOS Server

ssh to the server. #nano /etc/sysconfig/network-scripts/ifcfg-eth0 You will find… # ============================================================= # Network Interface Script generated by BareMetal # ============================================================= DEVICE=eth0 BOOTPROTO=STATIC ONBOOT=yes IPADDR=216.55.xx.xx NETMASK=255.255.255.0 HWADDR=6C:62:xx:xx:xx:C3 Change this line only to the new IP IPADDR=216.55.xx.xx Note: If you are changing to an IP on a different subnet and need to change your default gateway, this … Read more

Set up OpenVPN Server and Client on Windows 10

Need to setup a VPN? Here’s how to download and install OpenVPN. SERVER SETUP Download the installer from https://openvpn.net/index.php/download/community-downloads.html and run it on the server computer. Open the installer file and start the installation.   Remember to adjust the Windows firewall (open the 1194 UDP port). Assign a static IP to the new created TAP … Read more