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,873 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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

695 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