Я запустил ZeroNet в CentOS 7 Vagrant VirtualBox, но не могу получить к нему доступ со своего хоста. От гостя это работает:
[vagrant@localhost ~]$ curl http://127.0.0.1:43110/
Location changed: /1HeLLo4uzjaLetFx6NH3PMwFP3qbRbTf3D[vagrant@localhost ~]$
От хозяина:
$ curl http://127.0.0.1:43110/
curl: (56) Recv failure: Connection reset by peer
$ curl --connect-timeout 5 http://192.168.16.100:43110/
curl: (28) Connection timed out after 5001 milliseconds
Вот журнал запуска
[vagrant@localhost ZeroBundle]$ unset DISPLAY
[vagrant@localhost ZeroBundle]$ ./ZeroNet.sh
- Starting ZeroNet...
[06:21:28] - OpenSSL loaded, version: 01000207F
[06:21:28] - Version: 0.5.3 r2003, Python 2.7.11 |Continuum Analytics, Inc.| (default, Dec 6 2015, 18:08:32)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)], Gevent: 1.0.2
[06:21:28] - Creating FileServer....
[06:21:28] TorManager Tor controller connect error: error: [Errno 111] Connection refused in TorManager.py line 159 > socket.py line 344
[06:21:28] - Creating UiServer....
[06:21:28] - Removing old SSL certs...
[06:21:28] - Starting servers....
[06:21:28] Ui.UiServer --------------------------------------
[06:21:28] Ui.UiServer Web interface: http://127.0.0.1:43110/
[06:21:28] Ui.UiServer --------------------------------------
[06:21:29] FileServer Checking port 15441 using portchecker.co...
[06:21:30] FileServer [BAD :(] Port closed: Port 15441 is closed.
[06:21:30] FileServer Trying to open port using UpnpPunch...
[06:21:45] FileServer UpnpPunch run error: UpnpError: Failed to communicate with igd using port 15441 on local machine after 3 tries. in FileServer.py line 74 > UpnpPunch.py line 324 > UpnpPunch.py line 315
Вот мой бродячий файл
$ grep -ve '^\s*#' Vagrantfile | cat -s
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.network "forwarded_port", guest: 43110, host: 43110
config.vm.network "forwarded_port", guest: 15441, host: 15441
config.vm.network "public_network"
config.vm.provider "virtualbox" do |vb|
vb.gui = true
end
config.vm.provision "shell", run: "always", inline: <<-SHELL
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` vagrant /vagrant
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` dash /dash
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` zeronet /home/vagrant/ZeroBundle/ZeroNet
SHELL
end
Вот сетевые интерфейсы
[vagrant@localhost ~]$ ip address | grep inet
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic eth0
inet6 fe80::5054:ff:fe1f:dbb7/64 scope link
inet 192.168.16.100/24 brd 192.168.16.255 scope global dynamic eth1
inet6 fe80::a00:27ff:fea2:2944/64 scope link
VirtualBox 5.1.16
Бродяга 1.9.2
CentOS Linux выпуск 7.3.1611 (Core)