How to clear sysctl.conf file via PuTTY?

Hi !
I know how to add, but I did not find how to clear the information.
For example, add the default tcp_fin_timeout parameter to 30

sysctl -w net.ipv4.tcp_fin_timeout=10 >> /etc/sysctl.conf

save command

/etc/rc.d/sysctl restart

check parameter command
cat /proc/sys/net/ipv4/tcp_fin_timeout

but I don’t know how to delete :slight_smile: Please tell me who is in the subject?

You can edit the backup via 7zip, but the mode changes there, the default is -rw-r--r--, and it changes to -rwxrwxrwx, good or bad, I don’t know what kind of mode it is.

My changes
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.tcp_max_syn_backlog = 4096
net.ipv4.tcp_keepalive_time = 60
net.ipv4.tcp_keepalive_intvl = 15
net.ipv4.tcp_timestamps = 0
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.tcp_rfc1337 = 1
net.ipv4.ip_local_port_range = 1024 65535
net.netfilter.nf_conntrack_max = 16384
net.ipv4.tcp_synack_retries = 3
net.ipv4.tcp_sack = 0
net.ipv4.tcp_dsack = 0
net.ipv4.tcp_fack = 0
net.ipv4.tcp_retries2 = 6
net.ipv4.tcp_keepalive_probes = 4
net.ipv4.icmp_echo_ignore_all = 1
net.core.somaxconn = 8192
net.ipv4.tcp_max_orphans = 8192
net.ipv4.tcp_fin_timeout = 10
net.netfilter.nf_conntrack_generic_timeout = 60
net.netfilter.nf_conntrack_tcp_timeout_close_wait = 30
net.netfilter.nf_conntrack_tcp_timeout_established = 600
net.netfilter.nf_conntrack_tcp_timeout_fin_wait = 30
net.netfilter.nf_conntrack_tcp_timeout_syn_recv = 30
net.netfilter.nf_conntrack_tcp_timeout_syn_sent = 60
net.netfilter.nf_conntrack_tcp_timeout_time_wait = 60
net.netfilter.nf_conntrack_udp_timeout_stream = 60

I have changed for the better, the ping in the online game does not jump, it keeps stable, iptv began to work much better.
Who wants to check, save the settings before changing, Download backup

The same way you access the file, just remove the relevant lines(s).

(You can move this thread to the "Installing and Using OpenWrt" section.)

Exactly how is it?
For example add
sysctl -w net.netfilter.nf_conntrack_generic_timeout=60 >> /etc/sysctl.conf
/sbin/sysctl net.netfilter.nf_conntrack_generic_timeout
delete how?

  • Download config backup (SCP or web GUI)
  • Open archive
  • Open file
  • Edit/remove
  • Save
  • Add file back to archive
  • Upload config


  • SSH
  • vi /sbin/sysctl OR nano /sbin/sysctl (requires installation of nano)
  • Edit/remove
  • Save
  • Edit title
  • Change category

nano occupies 215.5 memory and still your option doesn't work.
I don't understand why answer if you don't know yourself.

Totally lost at what you mean. Are you being rude?

That is how I edit sysctl here - sorry it doesn't work for you.

Yes, correct (I told you that). Then just use vi as I noted:

:spiral_notepad: And the file is /etc/sysctrl.conf in official OpenWrt. Maybe that's your issue.

vi /etc/sysctrl.conf

(BTW, you can still move your thread to the "Installing and Using OpenWrt" section - no development skills were needed to answer your inquiry.)

does not work for me, but there is an option without nano ?
i don't want to install nano.
without nano everything is well programmed, I just need an example of how to remove a parameter or remove everything from sysctl.conf by default there is nothing there


Is that where you put the changes?

rm /etc/sysctrl.conf

(These are basic Linux/*nix commands.)

:spiral_notepad: And actually, the following text is in the file by default - if you wish toi re-add afterwards:

# Defaults are configured in /etc/sysctl.d/* and can be customized in this file

Open the file for editing in winscp, from a windows client.

Or some other OS, by copying it to the client, editing it, then copying it back.

1 Like

Simply restore the original value in /etc/sysctl.conf with

sysctl -w net.ipv4.tcp_fin_timeout=30 >> /etc/sysctl.conf

save command

/etc/rc.d/sysctl restart

You can verify by cat /proc/sys/net/ipv4/tcp_fin_timeout or sysctl -a

I can’t delete it, I just make a backup copy of the settings.
added more


who wants to experiment, see the values in the rmem and wmem parameters here

I played with sqm for a long time, in the end I realized that it only works worse for me, so I decided to play around with the settings of the network stack