Linux Tutorial | Matt Cooper - Open Source Support
Linux Tutorial | Matt Cooper - Open Source Support
Debian Tutorial

Block an IP address with iptables

The syntax is as follows:

iptables -A INPUT -s IP-ADDRESS -j DROP

e.g.

iptables -A INPUT -s 84.94.83.02 -j DROP
March 24, 2016by Matt Cooper
FacebookTwitterPinterestGoogle +Stumbleupon
Debian Tutorial

SSH Login without Password

Generate auth keys:

ssh-keygen -t rsa

Copy public key (id_rsa.pub) to destination server:

ssh-copy-id root@10.10.10.10

*Or manually insert key from id_rsa.pub (host) into /root/.ssh/authorized_keys (destination)

Now try shelling from the host machine to the destination e.g.

ssh root@10.10.10.10

You shouldn’t be asked for a password and dropped straight into the server.

September 11, 2015by Matt Cooper
FacebookTwitterPinterestGoogle +Stumbleupon
Debian Tutorial, Ubuntu Tutorial

Format and Mount a hard drive larger than 2TB Ubuntu

Find the drive name:

fdisk -l

*In this example we will use /dev/sdc

Now access parted to prepare the drive for formatting and mounting:

sudo parted /dev/sdc

Now set the following:

(parted) mklabel gpt
(parted) unit TB
(parted) mkpart primary 0.00TB 4.00TB (Changing 4.00TB to the size of your drive)
(parted) quit

Continue reading

September 2, 2015by Matt Cooper
FacebookTwitterPinterestGoogle +Stumbleupon
Debian Tutorial

Debian – Set date and time automatically with NTP

apt-get install ntp

Edit ntp config file:

vim /etc/ntp.conf

Update the 4 “server pool.ntp.org” lines to your locale. e.g. UK:

server 0.uk.pool.ntp.org
server 1.uk.pool.ntp.org
server 2.uk.pool.ntp.org
server 3.uk.pool.ntp.org

All zones can be found here http://www.pool.ntp.org/zone/@

Check the date/time is indeed correct:

date

Credit goes to http://wiki.debian.org/DateTime

July 1, 2015by Matt Cooper
FacebookTwitterPinterestGoogle +Stumbleupon
Debian Tutorial, Postfix

Domainkeys (DKIM) Installation Postfix

INSTALL AND CONFIGURE

Install the domain packages:

apt-get install opendkim opendkim-tools

Add the following to /etc/opendkim.conf:

Domain example.com
KeyFile /etc/postfix/dkim.key
Selector dkim
SOCKET inet:8891@localhost

*example.com being your domain

Add the following to /etc/default/opendkim:

SOCKET="inet:8891@localhost"

Add the following to the bottom /etc/postfix/main.cf:

Continue reading

June 23, 2015by Matt Cooper
FacebookTwitterPinterestGoogle +Stumbleupon
Page 1 of 41234»

About me

Hi, I'm Matt Cooper. I started this blog to pretty much act as a brain dump area for things I learn from day to day. You can contact me at: matt@linuxtutorial.co.uk

Recent Comments

  • Andrew on Export list of Amazon EC2 Instances to CSV
  • Matt Cooper on Proxmox – add a second hard drive to node for Backups
  • karis on Proxmox – add a second hard drive to node for Backups
  • Matt Cooper on Remote MySQL Database – Slow Connection
  • Matt Cooper on Bash script to send public IP address to Email

Categories

  • AdvancedTomato
  • Amazon AWS
  • Amazon Linux
  • Amazon S3
  • Apache
  • Apache Kafka
  • Backup Tutorial
  • Bash Scripting
  • Centos Tutorial
  • CloudFlare
  • Command line Tutorial
  • CPanel Troubleshooting
  • CPanel Tutorial
  • Debian Troubleshooting
  • Debian Tutorial
  • DKIM
  • Docker
  • EC2
  • ESXi
  • Faildows
  • Google Adwords
  • Google Analytics
  • Google Chromebook
  • Google Mail
  • graylog
  • IAM
  • imapsync
  • iRedmail Tutorial
  • ISPConfig3 Tutorial
  • Java
  • ldap
  • letsencrypt
  • MyDNS
  • MySQL Troubleshooting
  • MySQL Tutorial
  • Nest Install
  • Netbeans
  • Nginx
  • Nginx Troubleshooting
  • openssl
  • PCI Compliance
  • Percona
  • PHP
  • Plex Media Server Tutorial
  • Postfix
  • Proxmox Tutorial
  • Pure FTPd
  • Resourcespace Tutorial
  • Route 53
  • Rsync Tutorial
  • Security
  • Smoothwall Troubleshooting
  • Smoothwall Tutorial
  • SSH
  • tcpdump
  • Thunderbird
  • Tomcat Troubleshooting
  • Ubuntu Tutorial
  • Uncategorized
  • Unison
  • vmware
  • vzdump
  • WHM
  • Wireshark
  • Wordpress Troubleshooting
  • WordPress Tutorial

“See, you not only have to be a good coder to create a system like Linux, you have to be a sneaky bastard too." Linus Torvalds

© 2017 copyright www.linuxtutorial.co.uk // All rights reserved