How to setup and use iptables

What’s iptables?

Iptables is the current Linux firewall and routing service. It controls incoming and outgoing network.

 

How to stop/start/restart iptables?

Basically just like any other Linux service:

service iptables start 
service iptables stop 
service iptables restart

 

How to check if iptables is currently running?

Simply call service status

service iptables status

and check the result:

Firewall is stopped.

If the status message is “Firewall is stopped.” that means that iptables are not running and you should start it with sertvice iptables start. If you get some tables with bunch of geek stuff that means that iptables are running.

 

How to automatically start iptables service on Linux boot?

To enable iptables starting on boot run

chkconfig iptables on

or run code below to disable it

chkconfig iptables off

Continue Reading

Tags: service iptables status

Security by obscurity

This simple guide will help you secure your server in indirect way by hiding software versions from possible attackers. This can help you prevent many automated attacks and attacks based on software version number. If a hacker want’s to probe your system for hole he’ll start from collecting all version numbers from your running services. This guide will teach you setup common services not to give away their version numbers. This is called Security by obscurity and it’s not something to rely on but it can lower chances of getting your system hacked.

Apache (Web Server)

Let’s start with Apache first. It’s config file should at path

/etc/httpd/conf/httpd.conf

Open that with an editor of choice. For beginners I always suggest Midnight Commander but if you’re more experienced you can use antother editor like pico or vi. Anyway, in MC open file for editing by pressing F4 while the file is selected.

Locate those two lines and set it as follows. If you cant find them – add them.

ServerSignature Off
ServerTokens Prod

Server Signature will remove the identification of Apache version from error pages, and ServerTokens will identify Apache as “apache” without version number or OS information. Save the file and restart the Apache.

service httpd restart

Continue Reading

How to fix Midnight Commander line drawing in PuTTY

Midnight Commander is an awesome little file management tool. Learn how to install Midnight Commander. Folks that remember Norton Commander from MS DOS times know what I’m talking about.

Often problem with using Midnight Commander in PuTTY is that often it’s lines are messed up and look like this:

Midnight Commander in PuTTY with lines now rendered correctly.

This happens when because of charsets mismatch that uses PuTTY uses and MC. To fix this you’ll need to fix the charset in PuTTY. This guide however works only on sessions saved in PuTTY!

Here’s how to do it:

Continue Reading

Tags: putty line drawing problems

How to install Midnight Commander?

Whats Midnight Commander?

Midnight Commander is Shell application (visual file manager) for SSH like Norton Commander, that older geeks may remember from the time of DOS, or like Total Commander, the most advanced Shell application today.

 

Why do I need Midnight Commander?

Midnight Commander will help you move more easily trough server files/folders, edit config files, copy/move/delete files/folders/whole directory trees, pack and unpack archives, search for files, run commands in shell… You can also use MC to connect to other server’s FTP and copy files from/to other servers. (can be useful when migrating from one server to another)

 

How to install Midnight Commander?

The easiest way is using yum or apt-get package menages: all you need to do is execute one command and it will install Midnight Commander and all it’s dependencies

Continue Reading

Tags: yum install mc, install midnight commander, install mc, how to install midnight commander, midnight commander install, midnight commander linux, midnight commander fedora, yum install midnight commander, linux install mc, yum midnight commander, wget mc, wget midnight commander, how to install mc, midnight commander linux install, midnight commander, install midnight commander linux, linux mc install, midnight commander installieren, mc install, fedora install mc, linux midnight commander, install mc linux, how to install midnight commander linux, install mc on linux, fedora midnight commander, linux install midnight commander, midnight commander wget, fedora mc install, yum mc, midnight-commander update, linux midnight commander install, fedora isntall mc, fedora install midnight commander, redhat install mc, midnight commander installieren linux

How to block Google Ads on Windows computer?

If you, like me, hate ads and malicious websites there is a simple solution for all your problems. While most plugins just hide displaying of ads, or block ads just in browser that have the blocker installed, this hack totally blocks ads from even loading on whole computer in all browsers you have installed. As a bonus it’s not slowing down your browser like those ad blocking plugins with their tens of thousands of rules.

For this post I’ll show you how to block Google AdSense and Yahoo ads but you can use any ad network or website. Also, it’s good idea to block ads on your computer when you work a lot on your website so you cant make any accidental clicks since clicking on ads on your own site can get your account closed and get you accused of click fraud.

The whole process is easy as one, two, three!

Continue Reading

Tags: block google ads, windows 10 host file to block google ads, block google adsense via hosts file, how to block google ads, pagead googledoubleclicks com, https://tpc googlesyndication com, how to stop ad doubleclick net, Block all pagead googledoubleclicks com results, pagead googledoubleclicks, tpc googlesyndication com, how to block ads on my computer, how to block ads on windows 7, block all ads on this computer, block tpc googlesyndication, block ad doubleclick net