设置
- Debian 9.6
- 流浪者2.2.3
- 虚拟机均在 vagrant 中配置为地址空间“192.168.3.0/24”中具有静态 IPv4 的专用网络
- 据我发现 NFSv4 及更高版本仅监听 TCP:2049
Vagrantfile
(萃取)
config.vm.network :private_network, ip: "192.168.3.123"
config.vm.synced_folder ".", "/vagrant", type: "nfs"
iptables -L -n -v
Chain INPUT (policy DROP 393 packets, 65897 bytes)
pkts bytes target prot opt in out source destination
8629 1377K ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
0 0 ACCEPT tcp -- * * 192.168.3.0/24 0.0.0.0/0 tcp dpt:111
266 22344 ACCEPT udp -- * * 192.168.3.0/24 0.0.0.0/0 udp dpt:111
0 0 ACCEPT tcp -- * * 192.168.3.0/24 0.0.0.0/0 tcp dpt:2049
526K 1066M ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 600 packets, 37554 bytes)
pkts bytes target prot opt in out source destination
353K 36M ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
ip6tables -L -n -v
Chain INPUT (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
33 6015 ACCEPT all lo * ::/0 ::/0
0 0 ACCEPT tcp * * ::/0 ::/0 tcp dpt:22
1 601 ACCEPT all * * ::/0 ::/0 state RELATED,ESTABLISHED
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
25 5204 ACCEPT all * * ::/0 ::/0 state RELATED,ESTABLISHED
问题
没有规则,坐骑就能顺利进行。那么我不知道什么或者我缺少什么才能让安装座正常工作?
答案1
我将在没有适当规则的情况下通过预期方式连接到远程计算机,并找出该方法实际使用的端口:
netstat -vatn
对于开放的 TCP
netstat -vaun
对于开放的 UDP
lsof -i
列出开放端口
然后根据为您想要的流程列出的内容制定适当的规则。
这个网站可能有帮助:Iptable 要点