Articles for Linux

How to Show All NAT Tables Rules IPTABLES

How to Show All NAT Tables Rules IPTABLES

iptables -t nat -L
iptables -t nat -L -n -v | grep 'something'
iptables -t nat -L -n -v

The netstat-nat command display the natted connections on a Linux iptable firewall

yum install netstat-nat

# netstat-nat -n
To display SNAT connections, run:
# netstat-nat -S
To display DNAT connections, type:
# netstat-nat -D

List NAT 

iptables -t nat –line-numbers -L

Delete rule no 6 

iptables -t nat -D PREROUTING 6

 

no “setup” command found in CentOS minimal install

no “setup” command found in CentOS minimal install

In Minimum Install this will not get install

If we got below Error, we need to install some packages to get work with setup command

[root@gkhan.in ~] setup
-bash: setup: command not found

Here we can see how to install in minimal install

yum install setuptool -y
yum install system-config-network* -y
yum install system-config-firewall* -y
yum install system-config-securitylevel-tui -y
yum install system-config-keyboard -y
yum install ntsysv -y

Now we can use the setup utility, That’s it.

fail2ban missing whois program

fail2ban missing whois program

missing whois program in fail2ban email alerts . you are not able to receive IP information .

#yum search whois

gnome-nettool.x86_64 : A GNOME interface for various networking tools
jwhois.x86_64 : Internet whois/nicname client.
perl-Net-Whois.noarch : Get and parse “whois” domain data from InterNIC
perl-Net-Whois-IP.noarch : Perl extension for looking up the whois information
: for ip addresses

# yum install jwhois.x86_64

now test whois command

Continue reading fail2ban missing whois program

How to Install the noip Client on Linux

How to Install the noip Client on Linux

noip  provides free Dynamic DNS services  ( http://www.noip.com/remote-access) as DynDns was providing but its allow only three hostnames as free.

This guide will walk you through the installation and setup of the Dynamic Update Client (DUC) on a computer running Linux.  If you are using Ubuntu or Debian Linux please check our support site for guides on their specific setup.

If you are using Ubuntu Linux, please click here.

Continue reading How to Install the noip Client on Linux

Remote Host Identification Has Changed error and solution

Remote Host Identification Has Changed error and solution

When we run scp command  to copy data to remote host its gives us error

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!

Solution is

$ ssh-keygen -R {server.name.com}
$ ssh-keygen -R {ssh.server.ip.address}
$ ssh-keygen -R server.example.com

sample output

root@webserver html]# ssh-keygen -R 192.168.1.10
/root/.ssh/known_hosts updated.
Original contents retained as /root/.ssh/known_hosts.old

source ssh error

How to squid proxy not detected as a proxy

How to squid proxy not detected as a proxy

Edit   /etc/squid/squid.conf

and add the following lines

======

via off
forwarded_for off

request_header_access Allow allow all
request_header_access Authorization allow all
request_header_access WWW-Authenticate allow all
request_header_access Proxy-Authorization allow all
request_header_access Proxy-Authenticate allow all
request_header_access Cache-Control allow all
request_header_access Content-Encoding allow all
request_header_access Content-Length allow all
request_header_access Content-Type allow all
request_header_access Date allow all
request_header_access Expires allow all
request_header_access Host allow all
request_header_access If-Modified-Since allow all
request_header_access Last-Modified allow all
request_header_access Location allow all
request_header_access Pragma allow all
request_header_access Accept allow all
request_header_access Accept-Charset allow all
request_header_access Accept-Encoding allow all
request_header_access Accept-Language allow all
request_header_access Content-Language allow all
request_header_access Mime-Version allow all
request_header_access Retry-After allow all
request_header_access Title allow all
request_header_access Connection allow all
request_header_access Proxy-Connection allow all
request_header_access User-Agent allow all
request_header_access Cookie allow all
request_header_access All deny all

================================

Now you will be geeting for proxy server IP address on www.whatismyip.com it will not say this is proxy server.check before and after adding above lines.

Source link