Notes

Clear system of any files related to package.

apt-get remove --purge dump1090

RouterOS

Dead simple bandwidth limiting. Make sure FastTrack is disabled first.

/queue simple
add max-limit=512K/128K name=queue0 target=192.168.1.253/32
add max-limit=1M/1M name=queue1 target=192.168.1.254/32

More complicated traffic limiting queue.

name="chromecast" target=192.168.100.248/32 parent=none packet-marks="" priority=8/8
      queue=default-small/default-small limit-at=0/0 max-limit=2M/128k burst-limit=4M/0 burst-threshold=1500k/0
      burst-time=55s/0s

LINUX Notes

  1. cp: omitting directory
  2. Create symbolic links
  3. Test disk performance with hdparm
  4. Install from source
  5. Install .bin
  6. RPM installation
  7. Find USB devices
  8. Mount USB storage devices
  9. Static IP configuration for Linux
  10. Install default LAMP stack (Ubuntu) using apt-get
  11. Network interface disappeared after moving VMware virtual machine
  12. Update and patch CentOS / Redhat
  13. Show list of software to be updated
  14. Some packages are being held back
  15. Basic IPTables configuration
  16. Only update specific packages
  17. Configure SELinux to be permissive

tail -f /var/log/messages
ls -lh

cp: omitting directory

Problem: when trying to copy a directory to another location I get the following error cp: omitting directory.

Solution: add -r after the command cp, which means copy directories recursively.

cp -r old_file new_file

Create symbolic links

ln -s /etc/apache2 /home/user

* Directories must use soft links.

Test disk performanance

hdparm -Tt /dev/sda

Install from source

Untar

tar zxvf file.tar.gz

Move to the newly created directory.

cd file

Execute the script.

./file.sh

Install .bin

Change permission.

chmod +x file.bin

Execute the script.

./file.bin

RPM installation

Install RPM package.

rpm -iuh packages

Upgrade RPM package.

rpm -uvh package

Find USB devices

lsusb

Mount USB storage devices

The USB drive will be mount in to the folder named “mount” located in the users home directory.

mount /dev/usb mount

Assign the mount directory proper permission.

chmod 777 /mount/point

Unmount the USB device.

umount /dev/usb

Static IP configuration for Linux

The configuration is located at /etc/network/interfaces.

# The primary network interface
# allow-hotplug eth0
auto eth0
iface eth0 inet static
address 192.168.1.3
network 192.168.1.0
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1

Set DNS to resolve /etc/resolv.conf.

nameserver 192.168.1.1

Install default LAMP stack (Ubuntu) using apt-get

apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server

Network interface disappeared after moving VMware virtual machine

The solution is to remove the persistent-net.rules.

In Debian the file has the name of :

rm /etc/udev/rules.d/z25_persistent-net.rules

On Ubuntu the file name changes to :

rm /etc/udev/rules.d/70-persistent-net.rules

Then reboot.

Update and patch CentOS / Redhat

To update CentOS or Redhat issue the following command with Root privileges.

yum update

The output will be

Show list of software to be updated

yum list updates

Some packages are being held back

Run

apt-get dist-upgrade

Basic IPTables configuration

The following allows port 22, 80 and 443 in.

*filter


#  Allows all loopback (lo0) traffic and drop all traffic to 127/8 that doesn't use lo0
-A INPUT -i lo -j ACCEPT
-A INPUT -i ! lo -d 127.0.0.0/8 -j REJECT


#  Accepts all established inbound connections
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT


#  Allows all outbound traffic
#  You can modify this to only allow certain traffic
-A OUTPUT -j ACCEPT



# Allows HTTP and HTTPS connections from anywhere (the normal ports for websites)
-A INPUT -p tcp --dport 80 -j ACCEPT
-A INPUT -p tcp --dport 443 -j ACCEPT


#  Allows SSH connections
#
# THE -dport NUMBER IS THE SAME ONE YOU SET UP IN THE SSHD_CONFIG FILE
#
-A INPUT -p tcp -m state --state NEW --dport 22 -j ACCEPT


# Allow ping
-A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT


# log iptables denied calls
-A INPUT -m limit --limit 5/min -j LOG --log-prefix "iptables denied: " --log-level 7


# Reject all other inbound - default deny unless explicitly allowed policy
-A INPUT -j REJECT
-A FORWARD -j REJECT

COMMIT

Download: iptables.txt

Only update specific packages

yum update packagename

exp:

yum update httpd

Configure SELinux to be permissive

To modify SELINUX we need to edit the file /etc/selinux/config, do not forget to become root before modifying the files.

nano /etc/selinux/config

Search for the line that reads :

SELINUX=enforcing 

The following alternative options are available :
permissive and disabled

I prefer the service to function under “permissive”.

SELINUX=permissive

Now, reboot the system and the changes should take effect.

Links

Dump1090

https://discussions.flightaware.com/ads-b-flight-tracking-f21/raspbian-ubuntu-packages-for-dump1090-mutability-available-t19619.html