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,746 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
  • 2
2 Comments
 
LVL 9

Accepted Solution

by:
e-tsik earned 500 total points
Comment Utility
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
Comment Utility
Thanks!
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now