Solved

How do I configure tcp_max_orphans, tcp_keepalive_intvl, tcp_keepalive_probes and tcp_keepalive_time?

Posted on 2004-08-04
2
2,839 Views
Last Modified: 2013-12-06
Hello,

I'm trying to change the values of "tcp_max_orphans", "tcp_keepalive_intvl", "tcp_keepalive_probes" and "tcp_keepalive_time" in Red Hat 8.0.  I'm trying to modify the files using GEdit, but for some reason is not letting me do it.  Is there any way to change their default values?

I want to be able to kill inactive socket connections after a short period of time.  Am I in the right track?

Thanks in Advance.

J.H
0
Comment
Question by:frankmorrison
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 9

Accepted Solution

by:
e-tsik earned 500 total points
ID: 11722945
Hi :-)

Two options:
1.
echo "xxxx" > /proc/sys/net/ipv4/tcp_max_orphans
echo "xxxx" > /proc/sys/net/ipv4/tcp_keepalive_intvl
echo "xxxx" > /proc/sys/net/ipv4/tcp_keepalive_probes
echo "xxxx" > /proc/sys/net/ipv4/tcp_keepalive_time
(replace "xxxx" with the numbers you want to set)

2.
To permanently set these options, edit /etc/sysctl.conf. Put the lines:
net.ipv4.tcp_max_orphans = "xxxx"
net.ipv4.tcp_keepalive_intvl = "xxxx"
net.ipv4.tcp_keepalive_probes = "xxxx"
net.ipv4.tcp_keepalive_time = "xxxx"

About closing connections after a short period of time. A general optimzer for a routing machine should be:
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 1800
net.ipv4.tcp_window_scaling = 0
net.ipv4.tcp_sack = 0
net.ipv4.tcp_timestamps = 0

Look into those items and see if they fit your requirements. www.lartc.org (Linux advanced routing and control traffic howto).

Enjoy!
0
 
LVL 9

Expert Comment

by:e-tsik
ID: 12082005
Thanks!
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
linux SFTP 8 82
Linux FTP Error 5 48
Install XRDP on Ubuntu Server 16.10 x64 3 65
sed/awk/tail: how to read 3'de last line 4 46
This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question