[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Freedombox-discuss] Test if your freedombox is working as it should (testsuite)



On Monday 24 March 2014 06:50 AM, A. F. Cano wrote:
[...]

> Now, about the problems:
> 
> I suppose I should have asked: How do I access plinth when the fbx is
> running in a virtualbox?
> 
> Obviously, I need to know the interface names on which the virtualbox
> is listening.  The default eth0 is in NAT mode, so it can't be accessed
> from outside the virtualbox.  It only passes back packets from
> connections originated from inside the virtualbox, and it is connected
> directly to the physical board of the native machine/OS.  That's why ping
> and nslookup from inside the virtualbox work.

In the default NAT mode, the recent versions of VirtualBox supports port
mapping. With this feature we can map port X on host machine to port Y
on the guest. Any connections such as web requests arriving on host's
port X would actually be served by a web server on guest's port Y. It
should work well with all ports and protocols but requires adding
explicit mapping for each port.

> 
> So, next I went looking at the virtualbox documentation:
> 
> http://www.virtualbox.org/manual/ch06.html
> 
> It appears that what I need is to create a "Host-only" second interface.
> From the Settings > Network > Adapter 2 panel, selected Host-only
> adapter but then the Name dropdown menu only has the entry "Not
> Selected" and there's no way to change it.  There's another step that
> needs to be taken before that: File > Preferences > Network > Host-only
> Networks (tab) and then Add.  The Host-only network is then added:
> vboxnet0.  Then, from Machine > settings > Network > Adapter 2 (tab)
> the vboxnet0 name appears.
> 
> After starting the fbx, this appears in the routing table of the
> physical machine:
> 
> 192.168.56.0	*	255.255.255.0	U   0   0   0 vboxnet0
> 
> But I can't ping it.  Pointing konqueror (configured for no proxy
> and pointed to http://192.168.56.0/plinth) says connection refused -
> network unreachable.

That entry in the routing table means that any packets to IP address in
the range 192.168.56.0 to 192.168.56.255 will be sent using the newly
created vboxnet0 interface. Host machine will have an IP address in that
range and so should guest (with DHCP or static assignment inside the
guest). You should find the IP address of the guest machine with 'ip
addr list' or 'ipconfig' inside the guest and use that IP in the browser
URL.

> 
> Had to go back to the File > Preferences > Network > Host-only Networks
> (tab) and then click on the Edit icon, then I was able to change the
> ipv4 address to 10.0.2.15.
> 
> After that, konqueror does connect to the fbx (http://10.0.2.15/) and
> comes back with:
> 
> Index of /
> Name Last modified Size Description
> 
> but nothing happens when any of those links get clicked on.
> 
> http://10.0.2.15/plinth/ says
> 
> Not Found.
> The requested URL /plinth/ was not found on this server.
> 
> It looks like some redirection is not working.  There is only
> html/index.html in /var/www.

The IP address you set in File > Preferences -> Network > Host-only
Network is for the host. So when you pointed your browser to that
address you are in fact accessing the web server of host (I suspect you
have one setup on the host). This is why you are unable to find plinth.
Login to guest, set the IP address there (DHCP or manual) and use that IP.

> 
> From earlier research:
> 
> Inside the fbx, eth1 is detected.  From dmesg:
> 
> eth1: (PCI:33MHz:32-bit) 08:00:27:b2:43:c9
> eth1: Intel(R) PRO/1000 Network Connection
> 
> But ifconfig doesn't report eth1.  It needs to be manually brought up:
> #ifconfig eth1 up (there's no mention of eth1 in
> /etc/network/interfaces).
> 
> route only knows about eth0 (in the fbx/virtualbox)
> default	  10.0.2.2	0.0.0.0	UG	0	0	0	0 eth0
> 10.0.2.0  *		255.255.255.0	U	0	0	0 eth0
> 
> At this point, I can connect to the fbx, so it looks like the
> virtualbox issues are solved.  But I still can't get plinth.
> 
>> You can use the privoxy (8118), dns (53), tor (4431/9050) and XMPP
> 
> http://10.0.2.15:8118 says connection refused.

Same problem as above. To understand "Host-only" network, imagine that
you installed a new ethernet card in the host and called it 'vboxnet0'.
Then you added another ethernet card in the guest and called it 'eth0'.
Using a cable you have connected the two ethernet cards. Typically after
that one would setup an IP on the host and another different IP on the
guest and the two machines would be able communicate with each other.
Same is the case with host-only networking. You assign an IP inside the
guest and use that IP from the host.

Apart from the above two options, there is also the Bridged mode option
that is simplest. If you host computer is connecting to a router which
gives automatic DHCP IP address then bridging the guest will put guest
in same network as your host. This is as if you have plugged the guest
machine into the hosts' network. Consequence of this is that guest will
directly take its IP address from the router (or you can assign one
statically). Guest will be accessible from your entire network. Host to
guest and guest to host communication is as if two machines in the
network are communicating with each other. No mappings etc. are required.

It would be nice to have all this documented.

-- 
Sunil

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/freedombox-discuss/attachments/20140324/bef7aee3/attachment.sig>


Reply to: