UBUNTU DUMP


Ubuntu clean up

posted 24 Dec 2018, 04:56 by Donald Ross

sudo apt-get update

sudo apt-get clean
sudo purge-old-kernels   (fixed /boot 100% issue)
sudo apt autoremove
sudo update-grub

Ubuntu bandwidth testing

posted 24 Dec 2018, 02:49 by Donald Ross

sudo apt-get install iperf

###  client server setup

iperf -c 192.168.51.115   
iperf -s


EXAMPLE

donald@R2-D3:~$ iperf -c 192.168.51.115
------------------------------------------------------------
Client connecting to 192.168.51.115, TCP port 5001
TCP window size: 45.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.100.115 port 53340 connected with 192.168.51.115 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.2 sec  9.75 MBytes  8.02 Mbits/sec
donald@R2-D3:~$ iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[  4] local 192.168.100.115 port 5001 connected with 192.168.51.115 port 37054
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.6 sec  5.50 MBytes  4.34 Mbits/sec

-----------------------

ubuntu@ubuntu_pie:~$ iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[  4] local 192.168.51.115 port 5001 connected with 192.168.100.115 port 53340
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.4 sec  9.75 MBytes  7.85 Mbits/sec
ubuntu@ubuntu_pie:~$ iperf -c 192.168.100.115
------------------------------------------------------------
Client connecting to 192.168.100.115, TCP port 5001
TCP window size: 43.8 KByte (default)
------------------------------------------------------------
[  3] local 192.168.51.115 port 37054 connected with 192.168.100.115 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.2 sec  5.50 MBytes  4.53 Mbits/sec



Unable to Browse Samba share via Windows 10

posted 21 Nov 2018, 10:29 by Donald Ross

If you are unable to browse samba shares via windows 10 make the following changes.
--------------------------------------------------------------------------------------------------------------------------
If you want to enable insecure guest access, you can configure the following Group Policy settings:
 
Computer configuration\administrative templates\network\Lanman Workstation
"Enable insecure guest logons"
 
Note By enabling insecure guest logons, this setting reduces the security of Windows clients. 
-------------------------------------------------------------------------------------------------------------------------

SSH login insults

posted 6 Oct 2017, 13:37 by Donald Ross   [ updated 6 Oct 2017, 13:40 ]

#edit the sudo file
sudo nano /etc/sudoers
#add this and save
Defaults        insults
#example
tester@ns1:/home$ sudo mkdir test
[sudo] password for tester:
I've seen penguins that can type better than that.
[sudo] password for tester:

Change terminal colours

posted 6 Oct 2017, 13:35 by Donald Ross

sudo nano ~/.bashrc
#add this to the end of the file
PS1='\[\033[1;36m\]\u\[\033[1;31m\]@\[\033[1;32m\]\h:\[\033[1;35m\]\w\[\033[1;31m\]\$\[\033[0m\] '
#save and exit
crtl o <enter>
crtl x
#force change
source ~/.bashrc

Web Server Install on Pi 1

posted 4 Oct 2017, 08:34 by Donald Ross   [ updated 4 Oct 2017, 08:34 ]

#install web server on pi 1 
#install apache 2
sudo apt-get install apache2 -y
#install php5
sudo apt-get install php5 libapache2-mod-php5 -y
#install php curl
sudo apt-get install php5-curl
#take ownership and rename index.html
sudo chown pi: /var/www/html/index.html
sudo mv index.html index.html.old
#create php index file
sudo nano index.php
<?php echo "Pi 1 with apache & php & php curl"; ?>
<?php echo date('Y-m-d H:i:s'); ?>
<?php phpinfo();?>
#save and exit
crtl o then crtl x
#restart apache
sudo service apache2 restart

List

posted 29 Sep 2017, 07:19 by Donald Ross   [ updated 29 Sep 2017, 07:25 ]

#list processes for all users
ps aux
ps auxf

#list processes for all user
ps U <username>

kill <process number>

#list processes, cpu, memory
top

#list open files  (add -U for user)
lsof

#list files and sort in reverse order of date
Ls -lathr

Ubuntu / Linux SCP

posted 28 Aug 2017, 10:58 by Donald Ross



***scp
To copy all from Local Location to Remote Location (Upload)
scp -r /path/from/destination username@hostname:/path/to/destination
To copy all from Remote Location to Local Location (Download)
scp -r username@hostname:/path/from/destination /path/to/destination

-p  (total time)


Handy Apps

posted 28 Aug 2017, 05:28 by Donald Ross

**LIST

sudo add-apt-repository ppa:flexiondotorg/youtube-dl-gui
sudo apt update
sudo apt install youtube-dlg

Ubuntu DNS Server

posted 27 Aug 2017, 11:39 by Donald Ross   [ updated 3 Oct 2017, 12:26 ]



**INTSALL DETAIL TO BE ADDED


***
NOTES
reverse lookup zone 192.168.0.0/27 - configure as below
0-31 being the range and 0.168.192 being the subnet

zone "0-31.0.168.192.in-addr.arpa"  {
        type master;
        file "master/192.168.0.0-31.rev";
};


----------------------------------
Master and Slave example

/etc/bind/named.conf.local

zone "ddr.dc1.local" {
        type master;
        file "/var/lib/bind/ddr.dc1.local.hosts";
        allow-transfer {
                192.168.11.12;
                192.168.20.11;
                192.168.20.12;
                };
        };
zone "11.168.192.in-addr.arpa" {
        type master;
        file "/var/lib/bind/192.168.11.rev";
        allow-transfer {
                192.168.11.12;
                192.168.20.11;
                192.168.20.12;
                };
        };


-----------

zone "ddr.dc1.local" {
        type slave;
        file "/var/lib/bind/ddr.dc1.local.hosts";
        masters { 192.168.11.11; };
        };
zone "11.168.192.in-addr.arpa" {
        type slave;
        file "/var/lib/bind/192.168.11.rev";
        masters { 192.168.11.11; };
        };



-------------------------------------------

sudo apt-get purge --auto-remove bind9

**updates servers**
sudo rndc reload ddr.dc1.local
sudo rndc reload 11.168.192.in-addr.arpa

1-10 of 32