Iptables下MSS数据调整模块TCPMSS使用
发布时间:October 5, 2012 // 分类:Iptables // No Comments
为达到最佳的传输效能TCP在建立连接时会协商MSS(最大分段长度,一般为1460字节)值,即MTU(最大传输单元,不超过1500字节)减去IP数据包包头20字节和TCP数据包头20字节,取最小的MSS值为本次连接的最大MSS值,Iptables下TCPMSS模块即用来调整TCP数据包中MSS数值。
在ADSL拨号环境中由于PPP包头占用8字节,MTU为1492字节,MSS为1452字节,如不能正确设置会导致网络不正常,可以通过TCPMSS模块调整MSS大小。
TCPMSS使用参数:
#https://www.haiyun.me
--set-mss value #设置特定MSS值
--clamp-mss-to-pmtu #根据MTU自动调整MSS
应用示例:
iptables -t mangle -I POSTROUTING -o pppoe-wan -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
#自动调整经pppoe-wan接口发出的TCP数据MSS
Linux服务器TCP连接状态查看及详细说明
发布时间:September 30, 2012 // 分类:网络工具 // No Comments
Linux下统计当前TCP连接状态:
netstat -ant | awk '{print $NF}' | grep -v '[a-z]' | sort | uniq -c
33 ESTABLISHED
3 FIN_WAIT2
7 LISTEN
221 TIME_WAIT
TCP连接状态说明:
#https://www.haiyun.me
LISTEN:服务器正在监听的端口
SYN_SENT:客户发出新连线请求后,还未收到服务器回应;
SYN_RECV:服务器接收到新连线请求;
ESTABLISED:已建立数据连接;
FIN_WAIT1:客户端主动断开请求,等待服务端ack确认
FIN_WAIT2:收到服务器端断开ack确认,等待服务端FIN;
TIME_WAIT:主动断开方发送最后ack后等待2MSL时间。
OpenWRT路由配置万能中继WISP
发布时间:September 26, 2012 // 分类:OpenWrt // No Comments
OpenWrt配置无线客户端接口:
config 'interface' 'wisp'
option 'proto' 'dhcp'
无线配置一客户端+一AP:
#https://www.haiyun.me
config 'wifi-device' 'radio0'
option 'type' 'mac80211'
option 'channel' '5'
option 'macaddr' '00:1f:a3:65:55:8e'
option 'hwmode' '11g'
option 'txpower' '20'
option 'country' '00'
config 'wifi-iface'
option 'ssid' 'TD811R'
option 'encryption' 'psk2'
option 'device' 'radio0'
option 'mode' 'sta'
option 'network' 'wisp'
option 'key' 'onovps'
option 'bssid' 'C8:3A:35:02:15:28'
config 'wifi-iface'
option 'device' 'radio0'
option 'network' 'lan'
option 'mode' 'ap'
option 'ssid' 'OpenWrt'
option 'encryption' 'psk2'
option 'key' onovps'
Mysql配置允许远程连接
发布时间:September 26, 2012 // 分类:数据库 // No Comments
MySQL查看当前用户及允许登录的IP:
#https://www.haiyun.me
select host,user from mysql.user;
+-----------+--------+
| host | user |
+-----------+--------+
| 127.0.0.1 | root |
| localhost | root |
+-----------+--------+
2 rows in set (0.00 sec)
新建用户允许特定IP连接,%允许所有。
grant all privileges on *.* to 'root'@'%' identified by 'password' ;
或更新现用户host信息:
update mysql.user set host = '%' where user = 'root';
刷新权限:
flush privileges;
如果还不能连接检查防火墙是否开放相应端口,mysql监听ip地址,mysql是否禁用通过tcp连接。
分类
- Apache (13)
- Nginx (45)
- PHP (86)
- IIS (8)
- Mail (17)
- DNS (16)
- Cacti (14)
- Squid (5)
- Nagios (4)
- Puppet (7)
- CentOS (13)
- Iptables (23)
- RADIUS (3)
- OpenWrt (41)
- DD-WRT (1)
- VMware (9)
- 网站程序 (2)
- 备份存储 (11)
- 常用软件 (20)
- 日记分析 (10)
- Linux基础 (18)
- 欧诺代理 (0)
- Linux服务 (18)
- 系统监控 (4)
- 流量监控 (7)
- 虚拟化 (28)
- 伪静态 (2)
- LVM (3)
- Shell (18)
- 高可用 (2)
- 数据库 (16)
- FreeBSD (3)
- 网络安全 (25)
- Windows (35)
- 网络工具 (22)
- 控制面板 (3)
- 系统调优 (10)
- Cisco (3)
- VPN (6)
- ROS (20)
- Vim (14)
- KMS (4)
- PXE (2)
- Mac (1)
- Git (1)
- PE (1)
- LNS (2)
- Xshell (7)
- Firefox (13)
- Cygwin (4)
- OpenSSL (9)
- Sandboxie (3)
- StrokesPlus (1)
- AutoHotKey (4)
- Total Commander (3)
- WordPress (3)
- iMacros (6)
- Typecho (2)
- Ollydbg (1)
- Photoshop (1)
- 正则 (3)
- Debian (3)
- Python (8)
- NoSQL (6)
- 消息队列 (4)
- JS (7)
- Tmux (3)
- GO (7)
- HHVM (2)
- 算法 (1)
- Docker (2)
- PT (15)
- N1 (16)
- K2P (6)
- LUKS (4)
最新文章
- 光猫拨号ImmortalWrt/OpenWRT路由获取ipv6遇到的问题
- php-fpm错误error_log日志配置
- debian-12/bookworm安装mariadb10.3和mysql5.6
- smokeping主从配置及遇到的问题
- openwrt/linux使用tcpdump/nflog ulogd记录iptables日志
- tmux bash shell自动保存history
- ImmortalWrt/OpenWRT为guest wifi网络配置ipv6 nat6
- PVE更新upgrade遇到The following packages have been kept back
- openwrt/immortalwrt修改odhcpd ipv6 preferred_lifetime和valid_lifetime
- golang版本udpxy iptv rtp多播转http单播
最近回复
- opnfense: 谢谢博主!!!解决问题了!!!我之前一直以为内置的odhcp6就是唯一管理ipv6的方式
- liyk: 这个方法获取的IPv6大概20分钟之后就会失效,默认路由先消失,然后Global IPV6再消失
- 海运: 不好意思,没有。
- zongboa: 您好,請問一下有immortalwrt設定guest Wi-Fi的GUI教學嗎?感謝您。
- 海运: 恩山有很多。
- swsend: 大佬可以分享一下固件吗,谢谢。
- Jimmy: 方法一 nghtp3步骤需要改成如下才能编译成功: git clone https://git...
- 海运: 地址格式和udpxy一样,udpxy和msd_lite能用这个就能用。
- 1: 怎么用 编译后的程序在家里路由器内任意一台设备上运行就可以吗?比如笔记本电脑 m参数是笔记本的...
- 孤狼: ups_status_set: seems that UPS [BK650M2-CH] is ...
归档
- August 2024
- May 2024
- February 2024
- January 2024
- December 2023
- November 2023
- October 2023
- September 2023
- August 2023
- May 2023
- April 2023
- February 2023
- January 2023
- December 2022
- September 2022
- July 2022
- April 2022
- March 2022
- February 2022
- January 2022
- December 2021
- November 2021
- April 2021
- March 2021
- February 2021
- January 2021
- December 2020
- November 2020
- October 2020
- September 2020
- July 2020
- May 2020
- April 2020
- March 2020
- February 2020
- January 2020
- December 2019
- November 2019
- July 2019
- April 2019
- March 2019
- February 2019
- January 2019
- December 2018
- November 2018
- October 2018
- September 2018
- August 2018
- July 2018
- June 2018
- April 2018
- March 2018
- February 2018
- January 2018
- December 2017
- October 2017
- September 2017
- August 2017
- July 2017
- April 2017
- March 2017
- February 2017
- January 2017
- December 2016
- November 2016
- July 2016
- June 2016
- November 2015
- October 2015
- September 2015
- August 2015
- July 2015
- June 2015
- May 2015
- April 2015
- March 2015
- February 2015
- January 2015
- December 2014
- November 2014
- October 2014
- September 2014
- August 2014
- July 2014
- June 2014
- May 2014
- April 2014
- March 2014
- February 2014
- January 2014
- December 2013
- November 2013
- October 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- October 2011
- September 2011
- August 2011
- July 2011