我正在使用 Csi Linux 发行版并尝试使用它。它有 TorVPN,至少在理论上,它通过 Tor 网络路由所有流量。在service tor status
突击行动之后,我看到服务已启动。我尝试了几种方法,然后我会总结一下。我修改了一些 DNS 配置作为 AI 的线索。远离目标。尽管如此,连接仍然正常,因为没有使用 TorVPN。继续,如果 TorVPN 退出游戏,它就会有互联网。
最近我注意到一些需要互联网访问的命令在我的 Arch 系统上执行的时间太长。例如:
ssh ...
需要 3 分钟向我询问密码pip install ...
开始下载包需要 1 分钟npm install ...
永远挂起
但其他像 git 的,立即运行。大约一两周前,这些命令突然变慢了。在他们工作正常之前。
我尝试重新安装 linux 并使用可启动 USB 在 Ubuntu 和 Manjaro 上进行测试,但结果是一样的。这不可能是由于互联网连接速度慢造成的,因为我通常有 40 Mb/s 的下载和 10Mb/s 的上传。目前我正在使用 EndeavourOS。
我尝试将 my 设置/etc/resolv.conf
为8.8.8.8
(Google 的公共 DNS 服务器),但这并没有解决速度问题。
我还在 Windows 上对其进行了测试(我有 Windows 和 Linux 的双重引导)并且它工作正常。
ssh -vvv ...
直到它暂停的地方的完整输出:
OpenSSH_8.9p1, OpenSSL 1.1.1m 14 Dec 2021
debug1: Reading configuration data /etc/ssh/ssh_config
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/whistleroosh/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/whistleroosh/.ssh/known_hosts2'
debug2: resolving "xxx" port 22
debug3: resolve_host: lookup xxx:22
debug3: ssh_connect_direct: entering
debug1: Connecting to xxx [yyy] port 22.
debug3: set_sock_tos: set socket 3 IPV6_TCLASS 0x48
有谁知道造成这种放缓的原因是什么?
我经常(每天)遭受互联网连接丢失的困扰。当我有连接时,DSL 速度就是我的合同规定的速度。我想记录这些损失。Bundesntzagentur 为这些情况提供了一个工具 - Breitbandmessung - 但是这需要我手动启动每次测量。我不想照看这个过程。AFAICT breitbandmessung 软件没有命令行界面。
我的第一个想法是ping -i 300 google.com
将输出传输到文本文件中,但是到目前为止我不知道如何添加日期和时间。也可能有专门用于此目的的工具,我可以通过 cron 作业左右触发。或者更好的命令行fu。
我的项目需要移动互联网。我试图通过使用带有 M2M sim(公共 IP,无 NAT)的 LTE 棒式调制解调器来实现这一点
这在 ubuntu (5.3.0-29-generic) 上运行良好,但我无法在 Raspbian Buster (4.19.97+) 上运行
Feb 11 22:31:48 raspberrypi systemd[1]: Reloading.
Feb 11 22:31:51 raspberrypi systemd[1]: [email protected]: Current command vanished from the unit file, execution of the command list won't be resumed.
Feb 11 22:31:51 raspberrypi systemd[1]: [email protected]: Current command vanished from the unit file, execution of the command list won't be resumed.
Feb 11 22:32:00 raspberrypi systemd[1]: Reloading.
Feb 11 22:32:41 raspberrypi pppd[699]: pppd 2.4.7 started by root, uid 0
Feb 11 22:32:41 raspberrypi pppd[699]: Using interface ppp0
Feb 11 22:32:41 raspberrypi pppd[699]: Connect: ppp0 <--> /dev/ttyUSB1
Feb 11 22:32:41 raspberrypi NetworkManager[288]: <info> [1581460361.7138] manager: (ppp0): new Ppp device (/org/freedesktop/NetworkManager/Devices/5)
Feb 11 22:32:42 raspberrypi pppd[699]: CHAP authentication succeeded: Welcome!!
Feb 11 22:32:42 raspberrypi pppd[699]: CHAP authentication succeeded
Feb 11 22:32:42 raspberrypi pppd[699]: Could not determine remote IP address: defaulting to 10.64.64.64
Feb 11 22:32:42 raspberrypi pppd[699]: not replacing default route to eth0 [192.168.0.1]
Feb 11 22:32:42 raspberrypi pppd[699]: local IP address 10.217.44.214
Feb 11 22:32:42 raspberrypi pppd[699]: remote IP address 10.64.64.64
Feb 11 22:32:42 raspberrypi pppd[699]: primary DNS address 109.249.185.224
Feb 11 22:32:42 raspberrypi pppd[699]: secondary DNS address 109.249.186.32
Feb 11 22:32:42 raspberrypi NetworkManager[288]: <info> [1581460362.2378] device (ppp0): state change: unmanaged -> unavailable (reason 'connection-assumed', sys-iface-state: 'external')
Feb 11 22:32:42 raspberrypi NetworkManager[288]: <info> [1581460362.3090] device (ppp0): state change: unavailable -> disconnected (reason 'none', sys-iface-state: 'external')
Feb 11 22:35:30 raspberrypi pppd[699]: Terminating on signal 15
Feb 11 22:35:30 raspberrypi pppd[699]: Connect time 2.8 minutes.
Feb 11 22:35:30 raspberrypi pppd[699]: Sent 0 bytes, received 0 bytes.
Feb 11 22:35:30 raspberrypi NetworkManager[288]: <info> [1581460530.4393] device (ppp0): state change: disconnected -> unmanaged (reason 'connection-assumed', sys-iface-state: 'external')
Feb 11 22:35:30 raspberrypi pppd[699]: Connection terminated.
为此,我尝试将 wvdial 与这些设置一起使用
[Dialer Defaults]
Auto DNS = yes
Init1 = ATZ+CFUN=1
Init2 = ATH
Init3 = ATE1
Init3 = AT+CGDCONT=1,"IP","EEM2M"
Stupid mode = 1
Baud = 9600
Dial Command = ATD
Modem = /dev/ttyUSB1
ISDN = 0
Phone = *99#
Password = bt
Username = bt
NetworkManager.conf 有这个内容
[main]
plugins=ifupdown,keyfile
[ifupdown]
managed=false
ppp/resolv.conf 有这个内容
nameserver 109.249.185.224
nameserver 109.249.186.32
我认为这是由设置设置的(请参阅上面的日志)
最后但并非最不重要的一点是,这表明我在 wvdial 运行后执行 ifconfig -a 时。请注意,ppp0 中的 6 个数据包是到 10.217.44.214 的内部 ping
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.12 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::b435:fc5d:b267:a226 prefixlen 64 scopeid 0x20<link>
ether 00:e0:92:00:15:f3 txqueuelen 1000 (Ethernet)
RX packets 299 bytes 30739 (30.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 269 bytes 36598 (35.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 4 bytes 156 (156.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4 bytes 156 (156.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ppp0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet 10.217.44.214 netmask 255.255.255.255 destination 10.64.64.64
ppp txqueuelen 3 (Point-to-Point Protocol)
RX packets 6 bytes 66 (66.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 7 bytes 129 (129.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wwan0: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether 00:1e:10:1f:00:00 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
编辑1:当以root身份运行wvdial时,我得到这个:
--> WvDial: Internet dialer version 1.61
--> Initializing modem.
--> Sending: ATZ+CFUN=1
OK
--> Sending: ATH
OK
--> Sending: AT+CGDCONT=1,"IP","EEM2M"
OK
--> Modem initialized.
--> Sending: ATD*99#
--> Waiting for carrier.
CONNECT 150000000
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Tue Feb 11 23:01:49 2020
--> Pid of pppd: 1281
--> Using interface ppp0
--> pppd: X?C[01]X?C[01]
--> pppd: X?C[01]X?C[01]
--> pppd: X?C[01]X?C[01]
--> pppd: X?C[01]X?C[01]
--> pppd: X?C[01]X?C[01]
--> pppd: X?C[01]X?C[01]
--> local IP address 10.217.44.214
--> pppd: X?C[01]X?C[01]
--> remote IP address 10.64.64.64
--> pppd: X?C[01]X?C[01]
--> primary DNS address 109.249.185.224
--> pppd: X?C[01]X?C[01]
--> secondary DNS address 109.249.186.32
--> pppd: X?C[01]X?C[01]
我还注意到,当 wvdial 运行时,NetworkManager 将在 /etc/resolv.conf 中加载正确的 DNS,改变
# Generated by NetworkManager
nameserver 194.168.4.100
nameserver 194.168.8.100
至
nameserver 109.249.185.224
nameserver 109.249.186.32
# Generated by NetworkManager
离开 debian 后,我在笔记本电脑上使用了 devuan linux ,因为与 debian 相比,第一个具有更好的顺序性和简单性。
我对此非常满意,但我遇到了下一个问题:
当操作系统启动时,如果我的以太网电缆没有插入,或者即使我的连接出现问题,它也会等待大约 20 秒,同时等待:
配置互联网接口
...然后它说:
ifup 已经配置好了。完毕
或类似的东西,即使它确实配置了接口(如果从一开始就没有真正连接电缆,这真的很少见应该连接 - 我可能有电缆问题,因为它太长或者可能是因为端口有问题-) 即使没有真正配置接口并且我将无法访问互联网。
我想要的是:1)一种保存配置的方法,不需要在每次启动时等待这 20 秒ifup
重新配置,而是能够使用
service networking restart
如果我的 Internet 在启动过程中没有真正配置。
PS:每次开机要等 20 秒真的很多,很多时候我只想离线工作而没有插入电缆。
/etc/network/interfaces
:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp
# This is an autoconfigured IPv6 interface
iface eth0 inet6 auto