Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Wednesday, 11 October 2017

Sunday, 22 January 2017

My conky config file [download]

I put together this conkyrc config file yesterday, pretty pleased with it so far. 


http://pastebin.com/grrzVP6q 👊

(Background image is scarlett johansson in the upcoming Ghost in the shell film 💗)

Saturday, 3 September 2016

LINUX HOWTO: Limiting SSH access to specific IP addresses

Intro:

This is a simple way to permit a select few IP addresses to access your raspberry pi though SSH and deny any others. By white listing certain IP addresses from networks you know you are adding a layer of security helping prevent others from accessing your machine. This is handy if you only access your machine from a few set locations, such as on the LAN and at work.

There are a few methods you could go about doing this, but i find this the most easy to implement, allowing you do accomplish basic permit and deny without iptables.

The two files needed to be edited are /etc/hosts.allow and /etc/hosts.deny

Step 1) 

Enter:
sudo nano /etc/hosts.allow

The file should be empty. At this point just add the ip addresses or subnets which you want to permit, for example:
sshd: 10.0.0.0/255.255.255.0 
sshd: 192.168.0.0/255.255.255.0
TIP: For specific IP addresses, just enter the address without the subnet.

Step 2)

Enter:
sudo nano /etc/hosts.deny

By entering the following you will deny all other addresses which were not explicitly defined before (everyone else).
sshd: ALL

Conclusion:

Now only those ip addresses or subnets defined will be able to get ssh access to your ssh server, others will not be able to connect.

LINUX HOWTO: Adding SSH login messages


This will display a message to those who connect to you ssh server before logging on.

Steps:

sudo nano /etc/ssh/sshd_config
- Open this file in terminal. Then find the line "#Banner /etc/issue.net" and remove comment so that it reads "Banner /etc/issue.net". Then save.

sudo nano /etc/issue.net
- Secondly open this file and enter your message in this file, then save. ASCII looks good here.


sudo service ssh restart
- Restart ssh, and then the message will be displayed to users.


                  _==|
             _==|   )__)  |
               )_)  )___) ))
              )___) )____))_)
         _    )____)_____))__)\
          \---__|____/|___|___-\\---
  ^^^^^^^^^\   oo oo oo oo     /~~^^^^^^^
    ~^^^^ ~~~~^^~~~~^^~~^^~~~~~
      ~~^^      ~^^~     ~^~ ~^ ~^
           ~^~~        ~~~^^~


For ascii art like this check out:

LINUX FIX: Gigabyte 990X - USB 3.0, 2.0 and Ethernet disabled after Ubuntu install.



After installing Ubuntu on my new computer I realised that only two of my USB 2.0 ports were working an non of the USB 3.0 ports or Ethernet network card. This seems to be a problem with many similar Gigabyte boards to mine. However there is a quick easy (revealingly so) solution to this.

In terminal run the following command: sudo nano /etc/default/grub
Find the line GRUB_CMDLINE_LINUX="" and replace with GRUB_CMDLINE_LINUX="iommu=soft"
save the file
open up another terminal and run: sudo update-grub
exit and restart computer


After applying this, every port; both 3.0, 2.0 and ethernet should work perfectly.


SOURCE: Credits go to Willyweasel, ozcyto, oldfred, linux-hardware-guide

Tuesday, 5 April 2016

Blocking spotify ads with Spotify-AdKiller (LINUX)



 This is the latest and greatest spotify ad stopping script available at the moment. Been trailing it out and its good. It doest remove the ads per-say, however plays a track of your choice over the ads. This is for testing purposes and the developers suggest buying premium. Try it out yourself.

We all love Spotify, but sometimes people (like us) want to throw a party without having to listen to interrupting ads before having bought Spotify Premium. Well, with this killer project, now you can!

View project on github

Saturday, 24 October 2015

FIX: Getting the R.A.T. 3 mouse to work on Ubuntu

This is a problem I am faced with every time I install Ubuntu and want yo use my R.A.T. 3 mouse. I found a solution though googling and it linked me to this youtube video.

In the description is a simple guide, so you don’t have to watch the video. I have included in the post bellow.

First type in the command to find out which product you have:

xinput -list

Once you find out what mouse you have:

sudo gedit /etc/X11/xorg.conf

For me I have the Madcatz Mad Catz R.A.T.3; type in:

Section "InputClass"
Identifier "Mouse Remap"
MatchProduct "Madcatz Mad Catz R.A.T.3 Mouse"
MatchDevicePath "/dev/input/event*"
Option "ButtonMapping" "1 2 3 4 5 0 0 8 9 0 0 0 0 0"
EndSection

For Madcatz Saitek Cyborg R.A.T.3; type in:

Section "InputClass"
Identifier "Mouse Remap"
MatchProduct "Saitek Cyborg R.A.T.3 Mouse"
MatchDevicePath "/dev/input/event*"
Option "ButtonMapping" "1 2 3 4 5 0 0 8 9 0 0 0 13 14"
EndSection

Enjoy.