Page 1 of 1
No connectivity within Jail
Posted: 05 Jan 2014 21:51
by chrisf4lc0n
OK peeps, before you get angry with me I want to clarify something. I have followed the guide on how to create the Jail using this
viewtopic.php?f=79&t=3894, which I think is a great guide, I followed the:
note: the IP address cannot be the same as your Nas4Free!!! It also cannot be in the DHCP scope for your network, either.
Googled more info, edited rc.conf, but I am still stuck.
I DO NOT HAVE ANY INTERNET CONNECTIVITY ONCE INSIDE JAIL

Re: No connectivity within Jail
Posted: 05 Jan 2014 23:18
by raulfg3
Mark route Only TCP/IP whithin a jail
And post your NAS IP, and your jail IP /24
Re: No connectivity within Jail
Posted: 06 Jan 2014 08:40
by chrisf4lc0n
Code: Select all
JID IP Address Hostname Path
15 192.168.1.61 Apache.local /jails/Apache
As you wished sir
How did I know you would the 1st one to answer this post?

Re: No connectivity within Jail
Posted: 06 Jan 2014 09:04
by raulfg3
ok, I check that your jail Ip is 192.168.1.61 and your NIC is em0 (INTEL NIC) but what is your NAS IP, and your NAS NIC?.
Open a shell in your NAS and type "ifconfig" this print your NAS IP config, and do the same inside your jail ( to log inside your jail you need to know your jail ID) and type "jexec ID csh" or "jexec Apache csh" if you configure properly option to use name of jail.
Thebrig clone your actual NAS config so if you have internet outside the jail, you have Internet inside, but revise that your NIC (em0) is real your NIC (LAN in Nas4Free WebGUI)
Re: No connectivity within Jail
Posted: 06 Jan 2014 09:15
by chrisf4lc0n
My NAS IP is 192.168.0.16/24
I also tried the IPs within the DHCP range like 192.168.0.61 and still did not work...
As you can see tried it a for a long time and ended up JID 15
And yes it is em0...
Within Jail with the IP 192.168.0.61:
Code: Select all
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=4219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC,VLAN_HWTSO>
ether 68:05:ca:12:b1:1c
inet 192.168.0.61 netmask 0xffffff00 broadcast 192.168.0.255
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
Within Jail with the IP 192.168.1.1:
Code: Select all
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=4219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC,VLAN_HWTSO>
ether 68:05:ca:12:b1:1c
inet 192.168.1.1 netmask 0xffffff00 broadcast 192.168.1.255
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
Outside the Jail with Jail's IP 192.168.0.61:
Code: Select all
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=4219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC,VLAN_HWTSO>
ether 68:05:ca:12:b1:1c
inet 192.168.0.16 netmask 0xffffff00 broadcast 192.168.0.255
inet 192.168.1.61 netmask 0xffffff00 broadcast 192.168.1.255
inet 192.168.0.61 netmask 0xffffff00 broadcast 192.168.0.255
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
Re: No connectivity within Jail
Posted: 06 Jan 2014 09:25
by chrisf4lc0n
Found the reason why it was not working...
Trivial... Cannot be connected to VPN network...
Now I need to work out how to get the jail to get connected to tap0 instead of em0...
EDIT: Or just get the openVPN to work in the jail... I do however have a problem with that. If I run VPN within the jail, only that jail will be behind VPN network, right? It means that the Transmission running outside the jail will still have my home IP, correct me if I am wrong.
Re: No connectivity within Jail
Posted: 06 Jan 2014 10:53
by mekonghigh
chrisf4lc0n wrote:If I run VPN within the jail, only that jail will be behind VPN network, right? It means that the Transmission running outside the jail will still have my home IP, correct me if I am wrong.
I think you are right but if you only want to run torrents over VPN, maybe you can try;
http://www.forums.nas4free.org/viewtopi ... =79&t=5418
and
http://torguard.net/blog/how-to-setup-t ... on-deluge/
Re: No connectivity within Jail
Posted: 06 Jan 2014 11:59
by alexey123
For create tun device you can use
preinit script
I think, may be need add to TheBrig Jail prestart command

Need for openvpn server
Re: No connectivity within Jail
Posted: 06 Jan 2014 15:08
by chrisf4lc0n
I could run Deluge instead, I actually did for a while. Did not like it tho, to heavy, did not offer nice Windows/Linux GUI, was rather slow... May have to reconsider that however
There were 2 main reasons I wanted to run jails:
1. Apache server to configure reverse proxy for btsync.
2. Print Server.
Now I will have to reconsider everything.
@alexey123
Should I just add:
/bin/sh ifconfig tap create
into the Jail Start Command?
Re: No connectivity within Jail
Posted: 06 Jan 2014 15:43
by alexey123
chrisf4lc0n wrote:
@alexey123
Should I just add:
/bin/sh ifconfig tap create
into the Jail Start Command?
Not, this way not work.
Jail Start command execute script under jail, not under NAS4Free main. Full path for /etc/rc in this case is
Code: Select all
/mnt/<mount>/<path>/<to>/thebrig/<jailname>/etc/rc
1. Apache server to configure reverse proxy for btsync.
Lighttpd must work! I'll check issue today