Jails nor Plugins can connect outside FreeNAS

Status
Not open for further replies.

marian78

Patron
Joined
Jun 30, 2011
Messages
210
Crono Solutio X4 Tathanx for your tips. i will try it on next weekend and than i will
thanx for your tips. i will try it on next weekend and than i will send you feedback.
 

marian78

Patron
Joined
Jun 30, 2011
Messages
210
Hi.

I have shutdown my server for about 2 weeks (im was busy in my work). Than i power up to try your tips. But strange thing happend. My jail now working.... I dont known how, but is running.
 

marian78

Patron
Joined
Jun 30, 2011
Messages
210
WTF,

:mad:, today a set static IPV4 on my freenas and jails connection are gone.... Than i try your tips ( imdos, Oct 20, 2013) and now i cen see lan and lan can view jail. But my freenas cant stop or start plugin service from that jail (owncloud)....
 

marian78

Patron
Joined
Jun 30, 2011
Messages
210
Ok, after month i back.

Because i cant connect to my plugins from LAN (randomly), i set all my plugins as you write ( imdos, Oct 20, 2013). Now i want to get work plugin start/stop in freenas web interface.

1. edit IP adresses obtained fromm DHCP server of all plugins in /etc/local/nginx/plugins.conf
2. check configuration database for correct ip > sqlite3 /data/freenas-v1.db "select * from plugins_plugins" (http://doc.freenas.org/index.php/Creating_your_own_PBIs)
3. hm... in column "plugin_ip" is not set ip....
4. update ip of jails: sqlite3 /data/freenas-v1.db "update plugins_plugins set plugin_ip='192.168.1.101' where plugin_name='transmission'" (before my old ip was 192.168.1.201)
5. check again "sqlite3 /data/freenas-v1.db "select * from plugins_plugins"
6. restart /etc/rc.d/ix-nginx restart

7. :mad: o no, im still unable start/stop plugin from freenas web interface.

Can you helpme solve this problem?

Thx, Marian L.

EDIT: restart server. And now i can use start/stop button, but i lost again connection from LAN to plugin jail. Why? ..... i check ifconfig.

freenas ifconfig:

Code:
bge0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
 
options=c0099<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,VLAN_HWTSO,LINKSTATE>
 
ether 28:92:4a:2f:0e:b8
 
inet 192.168.1.11 netmask 0xffffff00 broadcast 192.168.1.255
 
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
 
media: Ethernet autoselect (1000baseT <full-duplex>)
 
status: active
 
ipfw0: flags=8801<UP,SIMPLEX,MULTICAST> metric 0 mtu 65536
 
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
 
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 0x9
 
inet 127.0.0.1 netmask 0xff000000
 
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
 
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
 
ether 02:71:40:1d:df:00
 
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
 
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: epair2a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
 
ifmaxaddr 0 port 13 priority 128 path cost 2000
 
member: epair1a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
 
ifmaxaddr 0 port 12 priority 128 path cost 2000
 
member: epair0a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
 
ifmaxaddr 0 port 11 priority 128 path cost 2000
 
member: bge0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
 
ifmaxaddr 0 port 1 priority 128 path cost 20000
 
epair0a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
 
options=8<VLAN_MTU>
 
ether 02:47:c7:00:0b:0a
 
inet6 fe80::47:c7ff:fe00:b0a%epair0a prefixlen 64 scopeid 0xb
 
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
 
media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
 
status: active
 
epair1a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
 
options=8<VLAN_MTU>
 
ether 02:a0:77:00:0c:0a
 
inet6 fe80::a0:77ff:fe00:c0a%epair1a prefixlen 64 scopeid 0xc
 
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
 
media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
 
status: active
 
epair2a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
 
options=8<VLAN_MTU>
 
ether 02:46:4b:00:0d:0a
 
inet6 fe80::46:4bff:fe00:d0a%epair2a prefixlen 64 scopeid 0xd
 
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
 
media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
 
status: active



jail ifconfig:

Code:
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 0x1
 
inet 127.0.0.1 netmask 0xff000000
 
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
 
epair0b: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
 
options=8<VLAN_MTU>
 
ether 02:47:c7:00:0c:0b
 
inet 192.168.1.102 netmask 0xffffff00 broadcast 192.168.1.255
 
inet6 fe80::47:c7ff:fe00:c0b%epair0b prefixlen 64 scopeid 0x2
 
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
 
media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
 
status: active




hm, what is wrong?

I restarted network service in jail, and finaly i can see it from LAN. But DHCP server change ip of jail to 192.168.1.104 because detect new MAC adres. why? :(

Thx, Marian.
 

marian78

Patron
Joined
Jun 30, 2011
Messages
210
Ok, after month i back.

Because i cant connect to my plugins from LAN (randomly), i set all my plugins as you write ( imdos, Oct 20, 2013). Now i want to get work plugin start/stop in freenas web interface.

1. edit IP adresses obtained fromm DHCP server of all plugins in /etc/local/nginx/plugins.conf
2. check configuration database for correct ip > sqlite3 /data/freenas-v1.db "select * from plugins_plugins" (http://doc.freenas.org/index.php/Creating_your_own_PBIs)
3. hm... in column "plugin_ip" is not set ip....
4. update ip of jails: sqlite3 /data/freenas-v1.db "update plugins_plugins set plugin_ip='192.168.1.101' where plugin_name='transmission'" (before my old ip was 192.168.1.201)
5. check again "sqlite3 /data/freenas-v1.db "select * from plugins_plugins"
6. restart /etc/rc.d/ix-nginx restart

7. :mad: o no, im still unable start/stop plugin from freenas web interface.

Can you helpme solve this problem?

Thx, Marian L.

EDIT: restart server. And now i can use start/stop button, but i lost again connection from LAN to plugin jail. Why? ..... i check ifconfig.

freenas ifconfig:

Code:
bge0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
 
options=c0099<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,VLAN_HWTSO,LINKSTATE>
 
ether 28:92:4a:2f:0e:b8
 
inet 192.168.1.11 netmask 0xffffff00 broadcast 192.168.1.255
 
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
 
media: Ethernet autoselect (1000baseT <full-duplex>)
 
status: active
 
ipfw0: flags=8801<UP,SIMPLEX,MULTICAST> metric 0 mtu 65536
 
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
 
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 0x9
 
inet 127.0.0.1 netmask 0xff000000
 
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
 
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
 
ether 02:71:40:1d:df:00
 
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
 
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: epair2a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
 
ifmaxaddr 0 port 13 priority 128 path cost 2000
 
member: epair1a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
 
ifmaxaddr 0 port 12 priority 128 path cost 2000
 
member: epair0a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
 
ifmaxaddr 0 port 11 priority 128 path cost 2000
 
member: bge0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
 
ifmaxaddr 0 port 1 priority 128 path cost 20000
 
epair0a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
 
options=8<VLAN_MTU>
 
ether 02:47:c7:00:0b:0a
 
inet6 fe80::47:c7ff:fe00:b0a%epair0a prefixlen 64 scopeid 0xb
 
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
 
media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
 
status: active
 
epair1a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
 
options=8<VLAN_MTU>
 
ether 02:a0:77:00:0c:0a
 
inet6 fe80::a0:77ff:fe00:c0a%epair1a prefixlen 64 scopeid 0xc
 
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
 
media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
 
status: active
 
epair2a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
 
options=8<VLAN_MTU>
 
ether 02:46:4b:00:0d:0a
 
inet6 fe80::46:4bff:fe00:d0a%epair2a prefixlen 64 scopeid 0xd
 
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
 
media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
 
status: active



jail ifconfig:

Code:
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 0x1
 
inet 127.0.0.1 netmask 0xff000000
 
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
 
epair0b: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
 
options=8<VLAN_MTU>
 
ether 02:47:c7:00:0c:0b
 
inet 192.168.1.102 netmask 0xffffff00 broadcast 192.168.1.255
 
inet6 fe80::47:c7ff:fe00:c0b%epair0b prefixlen 64 scopeid 0x2
 
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
 
media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
 
status: active




hm, what is wrong?

I restarted network service in jail, and finaly i can see it from LAN. But DHCP server change ip of jail to 192.168.1.104 because detect new MAC adres. why? :(

Thx, Marian.


edit: today i must do something with my unhappy situation :( . I decide to setup static IP for my all jails. i do this (i dont know if it is right, but its working):

1. edit IP adresses of all my plugins in freenas "/etc/local/nginx/plugins.conf"
Code:
location ~ /plugins/transmission/3/ {
    fastcgi_pass  192.168.1.101:12348;
    include            fastcgi_params;
    root /usr/pbi/transmission-amd64;
}
location ~ /plugins/plexmediaserver/2/ {
    fastcgi_pass  192.168.1.103:12349;
    include            fastcgi_params;
    root /usr/pbi/plexmediaserver-amd64;
}
location ~ /plugins/owncloud/1/ {
    fastcgi_pass  192.168.1.102:12346;
    include            fastcgi_params;
    root /usr/pbi/owncloud-amd64;
}


2. check configuration database for correct jails ip (read (http://doc.freenas.org/index.php/Creating_your_own_PBIs):
Code:
 sqlite3 /data/freenas-v1.db "select * from plugins_plugins"


3. if in column "plugin_ip" is not set my jails ip then i update database with correct ip:

for transmission jail:
Code:
sqlite3 /data/freenas-v1.db "update plugins_plugins set plugin_ip='192.168.1.101' where plugin_name='transmission'"


for plex jail:
Code:
sqlite3 /data/freenas-v1.db "update plugins_plugins set plugin_ip='192.168.1.103' where plugin_name='transmission'"


for owncloud jail:
Code:
sqlite3 /data/freenas-v1.db "update plugins_plugins set plugin_ip='192.168.1.102' where plugin_name='transmission'"


4. check again configuration database
Code:
"sqlite3 /data/freenas-v1.db "select * from plugins_plugins"


5. restart nginx
Code:
/etc/rc.d/ix-nginx restart


6. points 1. to 5. make start/stop buttons in freenas web interface working if jails ip is set correctly inside in jails (next points...).

7. edit jails for static ip. First list of all jails. In freenas console type:
Code:
[root@xxxxxx] ~# jls
  JID  IP Address      Hostname                      Path
    1  -              mycloud                      /mnt/volume0/jails_2/mycloud
    2  -              plex                          /mnt/volume0/jails_2/plex
    3  -              transmission                  /mnt/volume0/jails_2/transmission


This list of all my jails. Strange, i dont see any IP Adress (myabe someone explain this for me, because im beginer)

8. set static ip by editing rc.conf in all my jails and restart network in jail:

example for my rc.conf in transmission jail:
Code:
portmap_enable="NO"
sshd_enable="YES"
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
hostname="transmission"
devfs_enable="YES"
devfs_system_ruleset="devfsrules_common"
 
ifconfig_epair2b="inet 192.168.1.101 netmask 255.255.255.0"
defaultrouter="192.168.1.1"
 
transmission_enable="YES"
transmission_conf_dir="/usr/pbi/transmission-amd64/etc/transmission/home"
transmission_flags="-e /usr/pbi/transmission-amd64/etc/transmission/home/transmission"


PS: sorry for my bad english....
 
Status
Not open for further replies.
Top