Network access problem for iocage jail

Status
Not open for further replies.

Itay1778

Patron
Joined
Jan 29, 2018
Messages
269
Hi, everyone
I have a problem I have not found a solution anywhere.
I installed nextcloud 13 with iocage jail by this guide https://forums.freenas.org/index.ph...ll-checks-passed-updated-to-use-iocage.61934/
But I installed with vnet (without it it would not have turned on)
My problem was that after I installed everything and everything worked fine I had to reboot to FreeNAS system and after the system was turned on I could not access the nextcloud through the browser in any way. I try to use both the local IP address and my domain and nothing and the browser shows that it can not connect. There is not even a server error like as IP is not connected but it is I try to ping through the jail I get 100% loss but with I try to ping through the FreeNAS itself So everything works fine and all my other services and all my other jail work without problems
I have access to this iocage jail through SSH and jexec
I have no idea what caused it suddenly after restart and I do not have access to the jail through the browser I tried to make a restart to the jail did not help
And I really do not want to make a new installation for all this jail and nextcloud and with I was doing it it probably will come back again the same problem after restarting to FreeNAS or power outage

Please have someone idea how to fix it !!
 

Itay1778

Patron
Joined
Jan 29, 2018
Messages
269
??????????
 

Itay1778

Patron
Joined
Jan 29, 2018
Messages
269

dir_d

Explorer
Joined
Nov 9, 2013
Messages
55
I mean check Jail IP, /etc/resolv.conf within the jail, /etc/hosts within the jail, then ping out to make sure its ok. Make sure Apache is running if it is check MariaDB and the other services.
 

Itay1778

Patron
Joined
Jan 29, 2018
Messages
269
I mean check Jail IP, /etc/resolv.conf within the jail, /etc/hosts within the jail, then ping out to make sure its ok. Make sure Apache is running if it is check MariaDB and the other services.

It's from nano /etc/resolv.conf

# Generated by resolvconf
search duckdns.org - It's just the weird thing that this is not my full domain
nameserver 192.168.1.110- My router
nameserver 1.1.1.1 - My DNS in my home

And it's from nano /etc/hosts
Code:
# $FreeBSD: releng/11.1/etc/hosts 109997 2003-01-28 21:29:23Z dbaker $
#
# Host Database
#
# This file should contain the addresses and aliases for local hosts that
# share this file.  Replace 'my.domain' below with the domainname of your
# machine.
#
# In the presence of the domain name service or NIS, this file may
# not be consulted at all; see /etc/nsswitch.conf for the resolution order.
#
#
::1					 localhost localhost.my.domain
127.0.0.1			   localhost localhost.my.domain nextcloud
#
# Imaginary network.
#10.0.0.2			   myname.my.domain myname
#10.0.0.3			   myfriend.my.domain myfriend
#
# According to RFC 1918, you can use the following IP networks for
# private nets which will never be connected to the Internet:
#
#	   10.0.0.0		-   10.255.255.255
#	   172.16.0.0	  -   172.31.255.255
#	   192.168.0.0	 -   192.168.255.255
#
# In case you want to be able to connect to the Internet, you need
# real official assigned numbers.  Do not try to invent your own network
# numbers but instead get one from your network provider (if any) or
# from your regional registry (ARIN, APNIC, LACNIC, RIPE NCC, or AfriNIC.)
#
192.168.1.27/24 nextcloud


I think everything looks right
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I note in the instructions that it shows the jail creation command as:
iocage create -n yourjailsname ip4_addr="yourniccardname|your IP/network class handle 8,16,24" -r 11.1-RELEASE

If you did this:
ip4_addr="igb0|192.168.0.2/24"

Consider changing that to :
ip4_addr="vnet0|192.168.0.2/24"

as you went with vnet=on

You may be able to change it using:

iocage set ip4_addr="vnet0|192.168.0.2/24" yourjailsname

if it doesn't help, post the output of :
ifconfig

from your freenas console
 

Itay1778

Patron
Joined
Jan 29, 2018
Messages
269
I note in the instructions that it shows the jail creation command as:
iocage create -n yourjailsname ip4_addr="yourniccardname|your IP/network class handle 8,16,24" -r 11.1-RELEASE

If you did this:
ip4_addr="igb0|192.168.0.2/24"

Consider changing that to :
ip4_addr="vnet0|192.168.0.2/24"

as you went with vnet=on

You may be able to change it using:

iocage set ip4_addr="vnet0|192.168.0.2/24" yourjailsname

if it doesn't help, post the output of :
ifconfig

from your freenas console
I used it for installation and I mention that everything worked fine only after I restarted FreeNAS suddenly it did not work
iocage create -n nextcloud -r 11.1-RELEASE ip4_addr="vnet0|192.168.1.27/24" defaultrouter="192.168.1.110" vnet="on" allow_raw_sockets="1" boot="on"
 

Itay1778

Patron
Joined
Jan 29, 2018
Messages
269
if it doesn't help, post the output of :
ifconfig
Code:
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
		options=209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC>
		ether e0:69:95:2b:bf:5c
		hwaddr e0:69:95:2b:bf:5c
		inet 192.168.1.1 netmask 0xffffff00 broadcast 192.168.1.255
		inet 192.168.1.26 netmask 0xffffff00 broadcast 192.168.1.255
		nd6 options=9<PERFORMNUD,IFDISABLED>
		media: Ethernet autoselect (100baseTX <full-duplex>)
		status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
		options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
		inet6 ::1 prefixlen 128
		inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
		inet 127.0.0.1 netmask 0xff000000
		nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
		groups: lo
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
		ether 02:a1:c3:38:38:00
		nd6 options=9<PERFORMNUD,IFDISABLED>
		groups: bridge
		id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
		maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
		root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
		member: vnet0:5 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
				ifmaxaddr 0 port 4 priority 128 path cost 2000
vnet0:5: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
		description: associated with jail: nextcloud
		options=8<VLAN_MTU>
		ether 02:ff:60:ba:b5:81
		hwaddr 02:53:90:00:04:0a
		nd6 options=1<PERFORMNUD>
		media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
		status: active
		groups: epair
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Seems you are specifying the netmask in your resolv.conf which is not required:

192.168.1.27/24 nextcloud

should be:

192.168.1.27 nextcloud

You could also look at posting back the output of ifconfig... I expect to see that vnet0 is not properly bridged... we can fix that.


Also you are using a public address space in your home????
You mention 1.1.1.1 as your home DNS... this address space is public, not private. If it's working, i guess we don't need to solve it now, but you're asking for trouble there.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
OK; you're too fast for me...

Yes, as I expected, your bridge0 is missing em0 as a member.

Try:
ifconfig bridge0 addm em0 up
 

Itay1778

Patron
Joined
Jan 29, 2018
Messages
269
Seems you are specifying the netmask in your resolv.conf which is not required:

192.168.1.27/24 nextcloud

should be:

192.168.1.27 nextcloud

You could also look at posting back the output of ifconfig... I expect to see that vnet0 is not properly bridged... we can fix that.


Also you are using a public address space in your home????
You mention 1.1.1.1 as your home DNS... this address space is public, not private. If it's working, i guess we don't need to solve it now, but you're asking for trouble there.

Ok I'll fix up resolv.conf

And I sent the ifconfig

About my DNS https://1.1.1.1/ This great DNS is pretty new
 

Itay1778

Patron
Joined
Jan 29, 2018
Messages
269
OK; you're too fast for me...

Yes, as I expected, your bridge0 is missing em0 as a member.

Try:
ifconfig bridge0 addm em0 up
It works!!!!!!!!!!!!!!!!!!!! Thanks for saving me
 

Itay1778

Patron
Joined
Jan 29, 2018
Messages
269
For a moment I thought I needed to reinstall everything
Thanks!!!!!
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
OK; I understand your point on 1.1.1.1 now... it's not "in your home", it's the one you forward to "for all devices in your home"... my misunderstanding.

If that ( ifconfig bridge0 addm em0 up) worked, you can add a tunable (actually 2) to do it at startup:

Type: RC
Variable: cloned_interfaces
Value: bridge0

Type: RC
Variable: ifconfig_bridge0
Value: addm em0 up
 

Itay1778

Patron
Joined
Jan 29, 2018
Messages
269
Type: RC
Variable: cloned_interfaces
Value: bridge0

Type: RC
Variable: ifconfig_bridge0
Value: addm em0 up
Code:
 RC: Command not found.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
OK, I should have been more specific...

Tunables are in the Web UI (System/Tunables)

Hit the Add Tunable button and it should make sense from there...
 

Itay1778

Patron
Joined
Jan 29, 2018
Messages
269
OK, I should have been more specific...

Tunables are in the Web UI (System/Tunables)

Hit the Add Tunable button and it should make sense from there...

I added it thanks :D
 
Status
Not open for further replies.
Top