标签类目:netstat

减少Linux服务器的TIME_WAIT连接

分类:Kernelvim /etc/sysctl.conf,如果不存在则新建此文件

net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 1200
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_max_syn_backlog = 8192
net.ipv4.tcp_max_tw_buckets = 5000
net.ipv4.ip_local_port_range = 1024 65000

执行以下命令使配置生效:
/sbin/sysctl -p

各项解释如下:

继续阅读 »

Debian网络测试基础

分类:Debian$ ping yahoo.com # 检查 Internet 连接

$ traceroute yahoo.com # 跟踪 IP 数据包
$ ifconfig # 检查主机设置
$ route -n # 检查路由设置
$ dig [@dns-server.com] host.dom [{a|mx|any}] |less 继续阅读 »

查看程序/服务正在****的端口

Q. How do I find out which service is listening on a specific port? How do I find out what program is listening on a specific TCP Port?

A. Under Linux and UNIX you can use any one of the following command to get listing on a specific TCP port:
=> lsof : list open files including ports.

=> netstat : The netstat command symbolically displays the contents of various network-related data and information.
继续阅读 »


返回顶部