ip addr show ip addr show eth0 ip route show cat /etc/resolv.conf netstat -i netstat -ia # ss -s # ss -l # ss -t -a # ss -u -a ss -s ss -l ss -lp | grep 4949 netstat --listen # netstat command to find open ports netstat -vatn # To display open ports and established TCP connections, enter: netstat -vaun # To display only open UDP ports try the following command: netstat -vat # If you want to see FQDN (full dns hostname), try removing the -n flag: $ lsof Command Examples lsof -i # To display the list of open ports, enter: lsof -i 4 -a -p 9255 # To display all open IPv4 network files in use by # the process whose PID is 9255, use: A Note About FreeBSD Users You can use the sockstat command lists open Internet or UNIX domain sockets, enter: sockstat sockstat -l sockstat -4 -l sockstat -6 -l # ----------------------------------------------------------- # ----------------------------------------------------------- # --- NAT router # route route -n ip route show ip route list route add default gw 192.168.1.254 eth0 ip route add 192.168.1.0/24 dev eth0 # --- route add default gw 192.168.0.1 route # --- Destination Gateway Genmask Flags Metric Ref Use Iface # --- 192.168.0.0 * 255.255.255.0 U 0 0 0 eth0 # --- default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0 route add default gw 192.168.0.1 echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE iptables -A FORWARD -i eth1 -j ACCEPT # --- apt-get install dnsmasq # ----------------------------------------------------------- # --- 1. NAT Scripts # #!/usr/bin/env bash modprobe iptable_nat echo 1 > /proc/sys/net/ipv4/ip_forward ifconfig eth1 192.168.0.1 netmask 255.255.255.0 iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE iptables -A FORWARD -i eth1 -j ACCEPT # ----------------------------------------------------------- # --- 1. NAT Scripts # --- File: /etc/network/interfaces # iface eth0 inet static up route add -host 255.255.255.255 eth0 # ----------------------------------------------------------- http://www.cyberciti.biz/faq/linux-route-add/ # --- 2. NAT Scripts #!/usr/bin/env bash ifconfig eth0 down ifconfig eth0 192.168.0.2 netmask 255.255.255.0 route del -net default 2>/dev/null route add default gw 192.168.0.1 2>/dev/null echo "nameserver xx.xx.xx.xx" > /etc/resolv.conf # ----------------------------------------------------------- # ----------------------------------------------------------- # --- NETWORK monitooring # iftop -i wlan0 iptraf goaccess -f other_vhosts_access.log http://server.dzone.com/articles/6-command-line-tools-linux http://www.cyberciti.biz/tips/top-linux-monitoring-tools.html http://archive09.linux.com/feature/138744?theme=print http://kirrus.co.uk/2009/11/network-monitoring/ http://www.techofy.org/2012/09/glances-cli-curses-based-system.html # # # # # | http://nmon.sourceforge.net/pmwiki.php
To install ffmpeg on Ubuntu 14.04 LTS you have simply to open a terminal and execute the commands described below.
sudo apt-add-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get install ffmpeg gstreamer0.10-ffmpeg
Install TeamViewer in Ubuntu 14.04 64bit
sudo dpkg –add-architecture i386
sudo apt-get update
wget http://www.teamviewer.com/download/teamviewer_linux.deb
sudo dpkg -i teamviewer_linux.deb
sudo apt-get install -f
Step 1: add this rule in /etc/sysctl.conf : net.ipv6.conf.all.disable_ipv6 = 1
Step 2: add this rule in /etc/sysconfig/network: NETWORKING_IPV6=no
Step 3: add this setting for each nic X (X is the corresponding number for each nic) in /etc/sysconfig/network-scripts/ifcfg-ethX: IPV6INIT=”no”
Step 4: disable the ip6tables service : chkconfig ip6tables off
Step 5: reboot
ln -s /mnt/storage /var/www/ownClound/data
sudo vi /etc/sysconfig/selinux
Comment the following line:
#SELINUX=enforcing
Add this line:
SELINUX=disabled