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: midnight commander tips

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, linux mc install, mc install, midnight commander installieren, install midnight commander linux, fedora install mc, linux midnight commander, how to install midnight commander linux, install mc linux, install mc on linux, fedora midnight commander, midnight commander, yum mc, midnight commander wget, fedora mc install, linux install midnight commander, linux midnight commander install, fedora isntall mc, fedora install midnight commander, redhat install mc, midnight commander installieren linux, midnight commander linux installieren

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 adsense via hosts file, pagead googledoubleclicks com, how to stop ad doubleclick net, windows 10 host file to block google ads, Block all pagead googledoubleclicks com results, pagead googledoubleclicks, how to block google ads, how to block ads on windows 7, block ad doubleclick net, how to block google syndication, how to block google ad services, how to block google ad server, tpc google syndication, pagead googlesyndication com hosts, block google ad services, block google ads hosts, hwo to block pagead2 googlesyndication com in ie11, block google in hosts file, how to block https://pagead2 googlesyndication com, google ads doubleclick 127 0 0 1, how to block google ads win10, hosts file to block google, 127 0 0 1 www googleadservices com