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,ESTABLISHEDip6tables -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如果没有规则,坐骑就会运转良好。所以,我不知道什么,或者我错过了什么让坐骑工作?
发布于 2019-01-15 16:19:26
我将在没有规则的情况下,通过预期的方式连接到远程计算机,并找出该方法实际使用的端口:
开放TCP的netstat -vatn
开放UDP的netstat -vaun
lsof -i列表开放端口
然后根据您想要的流程列出的内容制定适当的规则。
这个网站也许会有所帮助:Iptable要点
https://unix.stackexchange.com/questions/494627
复制相似问题