Posts

Showing posts from July, 2016

Work with iptables rule

1) Save the current Firewall rules to some file. (In case something goes wrong we can quickly revert the settings. # iptables-save > /tmp/iptables.bkup 2) Now edit the file /tmp/iptables and copy paste the below command for making the port public. # iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT 3) The below command will write the new changes of iptables into the memory. # iptables-restore < /tmp/iptables.bkup 4) The below command will make the firewall changes permanent. After reboot also the new changes will not be lost. # /etc/init.d/iptables save 5) Alternatively we can issue the below commands for making the ports public through terminal and we can save the iptables rules. # iptables -I INPUT -p tcp -m tcp --dport 443 -j ACCEPT # iptables -I INPUT -p tcp -m tcp --dport 3306 -j ACCEPT

KeepAlive MaxKeepAliveRequests Apache optimize

MaxKeepAliveRequests MaxKeepAliveRequests limits the number of requests allowed per connection. It is used to control persistent connections. In Ubuntu, the default value of  MaxKeepAliveRequests  is  100 . You can change it to any value you desire. The recommended value of  MaxKeepAliveRequests  is between 50 and 75. You can change this value by editing the Apache configuration file. sudo nano / etc / httpd / httpd.conf Change the value from 100 to 60. MaxKeepAliveRequests 60 Save the file and restart Apache. sudo / etc / init.d / httpd restart KeepAliveTimeout KeepAliveTimeout defines how long the server waits for the new request from connected clients. Setting KeepAliveTimeout to a high value may cause performance issues in a heavily loaded web server. In Ubuntu, the default value of  KeepAliveTimeout  is  15 . The recommended value of  KeepAliveTimeout  is between 1 and 5. You can change this value by editing the Apache configuration file. sudo nano /