{"title": "sysctl配置如下\n#!!! Do not change these settings unless you know what you are doing !!!\nnet.ipv4.ip_forward = 1\n#net.ipv4.conf.all.forwarding = 1\n#net.ipv4.conf.default.forwarding = 1\n################################\n#net.ipv6.conf.all.forwarding = 1\n#net.ipv6.conf.default.forwarding = 1\n#net.ipv6.conf.lo.forwarding = 1\n################################\nnet.ipv6.conf.all.disable_ipv6 = 1\nnet.ipv6.conf.default.disable_ipv6 = 1\nnet.ipv6.conf.lo.disable_ipv6 = 1\n################################\nnet.ipv6.conf.all.accept_ra = 2\nnet.ipv6.conf.default.accept_ra = 2\n################################\nnet.core.netdev_max_backlog = 1048576\nnet.core.netdev_budget = 50000\n#fs.file-max = 51200\nnet.core.rmem_max = 524288000\nnet.core.wmem_max = 524288000\nnet.core.rmem_default = 10000000\nnet.core.wmem_default = 11059200\nnet.core.somaxconn = 1048576\n################################\nnet.ipv4.icmp_echo_ignore_all = 0\nnet.ipv4.icmp_echo_ignore_broadcasts = 1\nnet.ipv4.icmp_ignore_bogus_error_responses = 1\nnet.ipv4.conf.all.accept_redirects = 0\nnet.ipv4.conf.default.accept_redirects = 0\nnet.ipv4.conf.all.secure_redirects = 0\nnet.ipv4.conf.default.secure_redirects = 0\nnet.ipv4.conf.all.send_redirects = 0\nnet.ipv4.conf.default.send_redirects = 0\nnet.ipv4.conf.default.rp_filter = 1\nnet.ipv4.conf.all.rp_filter = 1\nnet.ipv4.tcp_keepalive_time = 1200\nnet.ipv4.tcp_timestamps = 1\nnet.ipv4.tcp_keepalive_intvl = 12\nnet.ipv4.tcp_keepalive_probes = 5\nnet.ipv4.tcp_synack_retries = 3\nnet.ipv4.tcp_syn_retries = 3\nnet.ipv4.tcp_syncookies = 1\nnet.ipv4.tcp_rfc1337 = 1\n#net.ipv4.tcp_tw_recycle = 0\nnet.ipv4.tcp_tw_reuse = 1\nnet.ipv4.tcp_fin_timeout = 12\nnet.ipv4.ip_local_port_range = 10000 65000\nnet.ipv4.tcp_max_tw_buckets = 2000000\nnet.ipv4.tcp_fastopen = 3\nnet.ipv4.tcp_rmem = 30000000 30000000 67108864\nnet.ipv4.tcp_wmem = 30000000 30000000 67108864\nnet.ipv4.tcp_mem = 94500000 91500000 92700000\nnet.ipv4.udp_rmem_min = 16384\nnet.ipv4.udp_wmem_min = 16384\nnet.ipv4.tcp_mtu_probing = 0\n##############################\nnet.ipv4.conf.all.arp_ignore = 2\nnet.ipv4.conf.default.arp_ignore = 2\nnet.ipv4.conf.all.arp_announce = 2\nnet.ipv4.conf.default.arp_announce = 2\n##############################\nnet.ipv4.tcp_autocorking = 0\nnet.ipv4.tcp_slow_start_after_idle = 0\nnet.ipv4.tcp_max_syn_backlog = 1048576\nnet.core.default_qdisc = fq_codel\nnet.ipv4.tcp_congestion_control = bbr\nnet.ipv4.tcp_notsent_lowat = 81920\nnet.ipv4.tcp_no_metrics_save = 1\nnet.ipv4.tcp_ecn = 2\nnet.ipv4.tcp_ecn_fallback = 1\nnet.ipv4.tcp_frto = 0\n##############################\nnet.ipv6.conf.all.accept_redirects = 0\nnet.ipv6.conf.default.accept_redirects = 0\nvm.swappiness = 0\nnet.ipv4.ip_unprivileged_port_start = 0\nnet.ipv4.tcp_window_scaling = 1\nnet.ipv4.tcp_sack = 1\nfs.file-max = 40000500\nfs.nr_open = 40000500\n###########new\nnet.netfilter.nf_conntrack_max = 1048576\nnet.nf_conntrack_max = 1048576\nnet.netfilter.nf_conntrack_tcp_timeout_fin_wait = 30\nnet.netfilter.nf_conntrack_tcp_timeout_time_wait = 30\nnet.netfilter.nf_conntrack_tcp_timeout_close_wait = 15\nnet.netfilter.nf_conntrack_tcp_timeout_established = 60\nnet.ipv4.tcp_max_orphans = 131072\nnet.ipv4.tcp_retries2 = 5\n###########\nnet.core.optmem_max = 10000000\nnet.ipv4.tcp_fack = 1\nnet.ipv4.tcp_retrans_collapse = 1\nvpn 网络无法连接到远程桌面内容:根据您提供的sysctl配置,我看到您启用了IP转发以及禁用了IPv6。这些配置与VPN连接到远程桌面无关,因为VPN和远程桌面是两个不同的网络服务。\n\n如果您无法通过VPN连接到远程桌面,请确保以下几点:\n\n1. 检查VPN连接是否成功建立。您可以尝试连接到VPN服务器并确认连接是否成功。如果连接失败,请检查VPN服务器的配置和日志以查看是否有任何错误。\n\n2. 检查您的防火墙设置。可能需要在防火墙上打开相应的端口以允许VPN流量通过。通常,VPN使用的端口是UDP 500和UDP 4500。\n\n3. 检查您的路由设置。确保VPN客户端正确配置了路由表,以便将远程桌面流量路由到正确的目的地。\n\n4. 检查您的远程桌面服务器配置。确保远程桌面服务器已启用,并且允许使用VPN进行连接。\n\n如果您仍然无法连接,请提供更多详细信息,例如错误消息或日志,以便我们可以更好地帮助您解决问题。\n\n

Linux sysctl 配置优化指南:提升网络性能和安全性

原文地址: https://www.cveoy.top/t/topic/qDIn 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录