无法让 DARKSTAT 在我的笔记本电脑上运行,并且一直无法连接...设置配置文件时出现问题

无法让 DARKSTAT 在我的笔记本电脑上运行,并且一直无法连接...设置配置文件时出现问题

我刚刚在我的 ubuntu 20.04.3 LTS 中安装了 Darkstat 但似乎配置不正确。

我已经运行 ifconfig 并得到:

enp2s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 34:97:f6:72:5d:ce  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

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 206402  bytes 16392704 (16.3 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 206402  bytes 16392704 (16.3 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.7  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::6af0:14a1:e5d5:642f  prefixlen 64  scopeid 0x20<link>
        inet6 2800:40:19:281:4eac:a63a:cdb7:1866  prefixlen 64  scopeid 0x0<global>
        inet6 2800:40:19:281:a6aa:1d8c:a054:b835  prefixlen 64  scopeid 0x0<global>
        ether a4:02:b9:24:cf:5c  txqueuelen 1000  (Ethernet)
        RX packets 711506  bytes 776107164 (776.1 MB)
        RX errors 0  dropped 4  overruns 0  frame 0
        TX packets 337444  bytes 158220575 (158.2 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

利用这些信息,我可以配置 Darkstat:

# Turn this to yes when you have configured the options below.
START_DARKSTAT=yes

# Don't forget to read the man page.

# You must set this option, else darkstat may not listen to
# the interface you want
INTERFACE="-i wlp3s0"

DIR="/var/lib/darkstat"
PORT="-p 666"
BINDIP="-b 127.0.0.1"
LOCAL="-l 192.168.1.7/255.255.255.0"

# File will be relative to $DIR:
# DAYLOG="--daylog darkstat.log"

# Don't reverse resolve IPs to host names
#DNS="--no-dns"

#FILTER="not (src net 192.168.0 and dst net 192.168.0)"

# Additional command line Arguments:
# OPTIONS="--syslog --no-macs"

请注意,我已经尝试过192.168.1.1(我的路由器),并且192.168.1.0

保存文件后我运行:

sudo /etc/init.d/darkstat restart

我尝试进入浏览器localhost/666127.0.0.1/666得到“无法连接“ 信息。

我究竟做错了什么?

答案1

端口号需要用冒号而不是斜线与主机名分隔。因此,您应该将浏览器指向localhost:666127.0.0.1:666

相关内容