What is the proper way to add a loopback device (127.0.0.1) to an iocage jail?

Status
Not open for further replies.

Dwarf Cavendish

Contributor
Joined
Dec 19, 2017
Messages
121
Yesterday I made an iocage jail with shared IP networking for running Plex. I noticed that Plex did not manage to get any metadata. When I looked into the logs I found out that Plex attempts to do http calls to 127.0.0.1, which then fail. When I do ifconfig in the jail it does not show any loopback device, so that explains a thing or two: I should add one to my jail. The question is how.

I have consulted this for setting up the networking for my jail: http://iocage.readthedocs.io/en/latest/networking.html#configuring-network-interfaces . This all works well, I can install packages (outbound traffic) and configure Plex (inbound traffic). However, it does not say anything about loopback devices. What I think I should do is add a loopback device to /etc/rc.conf in the jail, but 1) I am not sure if that is the proper way to do it and 2) I am not keen on hosing the networking of my NAS.

This would be the last puzzle piece after which I got everything I had working with iocage, any help is greatly appreciated :) .
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
Look through the plex configs and see if you can update 127.0.0.1 to your shared IP. This should allow plex to see itself over the network. Otherwise this post may have some useful information.

Personally, I would not use shared IPs for any jails. Separate services get separate address for security and flexibility.
 

Dwarf Cavendish

Contributor
Joined
Dec 19, 2017
Messages
121
From
Look through the plex configs and see if you can update 127.0.0.1 to your shared IP. This should allow plex to see itself over the network. Otherwise this post may have some useful information.

Personally, I would not use shared IPs for any jails. Separate services get separate address for security and flexibility.

Especially this post looks useful here. It basically says that I can bind another IP address to the loopback device as I did with the ethernet device. In the meantime I also found this, which says that I should be using a cloned interface. That seems more complicated than just binding another IP address to lo0, so I'll go with the latter. I'll try it out on a VM first.
 
Status
Not open for further replies.
Top