Task: Disable / Turn off Linux Firewall (Red hat/CentOS/Fedora Core) Type the following two commands (you must login as the root user): # /etc/init.d/iptables save # /etc/init.d/iptables stop Task: Enable / Turn on Linux Firewall (Red hat/CentOS/Fedora Core) Type the following command to turn on iptables firewall: # /etc/init.d/iptables start Other Linux distribution If you […]
Archive for the ‘Linux’ Category
PORT FORWARDING with IPTABLES in LINUX
These are the Iptable rules required for port forwarding xxx.xxx.xxx.xxx:8888 to 192.168.0.2:80 /sbin/iptables -t nat -A PREROUTING -p tcp -i eth0 -d xxx.xxx.xxx.xxx –dport 8888 -j DNAT –to 192.168.0.2:80 /sbin/iptables -A FORWARD -p tcp -i eth0 -d 192.168.0.2 –dport 80 -j ACCEPT # iptables -t nat -L Here rdp 75.144.218.185:13389 will forward to 192.168.1.5 port […]
Step-by-step OpenLDAP Installation and Configuration on server side
This tutorial describes how to install and configure an OpenLDAP server and also an OpenLDAP client. Step by Step Installation and Configuration OpenLDAP Server openldap 2.2.13-6.4E System name: ldap.xyz.com Domain name: xyz.com System IP: 192.168.0.22 Note: Use your domain name and IP instead of xyz. Easy steps for adding users: 1. Create unix user […]
Step-by-step OpenLDAP Installation and Configuration on client side
Step #1. Installation [root@ldapclient ~]# yum install authconfig Step #2. Run the command [root@ldapclient ~]# authconfig-gtk Step #3. Settings [*] Use LDAP [*] Use LDAP Authentication [Both should be checked] Click “Next”. [ ] Use TLS Server: ldap.xyz.com Base DN: dc=xyz,dc=com Click “Ok” to confirm. Note: Use your domain name instead of xyz.
Quit from shell without saving into history
There are many instances when we want to quit from shell without saving any command in history. We might have run by mistake some rookie command and you dont want to disclose it to others. kill -9 $$ will do the needful as $$ will provide the PID of the current shell.
Local port range sysctl tuning for high bandwidth Linux servers
Most of the Linux distributions specify local port range from 16384 to 65536 and this may be too low for very high bandwidth and busy boxes, let’s say SMTP, Hosting, POP3/Imap and Proxy servers. You can adjust this setting by editing /etc/sysctl.conf file and replacing the default: net.ipv4.ip_local_port_range = 16384 65536 with net.ipv4.ip_local_port_range = 1024 65536 […]
How to redirect port using IPTABLES
You can redirect the port in IPTABLES using the prerouting parameter. Following is the command you can use to redirect the traffic of port 587 to port 25. $ /sbin/iptables -t nat -I PREROUTING -p tcp –dport 587 -j REDIRECT –to-port 25 $ /etc/init.d/iptables save $ /etc/init.d/iptables restart You can change the ports in the […]


Tags: 
