View previous topic :: View next topic |
Author |
Message |
(l)user Guru
Joined: 31 Jan 2004 Posts: 334 Location: Poland
|
Posted: Fri Aug 12, 2005 4:18 pm Post subject: [solved]chroot jail |
|
|
I want to make a shell accouts with acces to irc links etc and i want them to be in chroot. I have merged jail and im trying to set it up:
Code: |
#mkdir /home/chroot
#mkjailenv /home/chroot
#addjailsw /home/chroot
|
etc
now when im trying to add some software like links or mc...
Code: |
# addjailsw /home/chroot/ -P mc
addjailsw
A component of Jail (version 1.9 for linux)
http://www.gsyc.inf.uc3m.es/~assman/jail/
Juan M. Casillas <assman@gsyc.inf.uc3m.es>
Guessing mc args(0)
|
and nothing happens... its probably because jail is getting old(last update 2003).
Anyway i have succesfuly added ftp to my chrootedenv but i cannot connect any server. Is there a way to acces network from chroot jail? Is there an altenrative for jail? _________________ Registered Linux user #302020
Gadu Gadu #490092
Last edited by (l)user on Fri Aug 12, 2005 10:22 pm; edited 1 time in total |
|
Back to top |
|
|
prymitive Apprentice
Joined: 13 Jun 2004 Posts: 260
|
Posted: Fri Aug 12, 2005 4:28 pm Post subject: Re: chroot jail |
|
|
Quote: |
Code: |
# addjailsw /home/chroot/ -P mc
addjailsw
A component of Jail (version 1.9 for linux)
http://www.gsyc.inf.uc3m.es/~assman/jail/
Juan M. Casillas <assman@gsyc.inf.uc3m.es>
Guessing mc args(0)
|
and nothing happens... its probably because jail is getting old(last update 2003).
Anyway i have succesfuly added ftp to my chrootedenv but i cannot connect any server. Is there a way to acces network from chroot jail? Is there an altenrative for jail? |
You must run "mc --version" not only mc becouse jail executes the app You tell him to add and waits for that app to finish, so if You just type "mc" it will run it and You will wait forever becouse mc won't quit itself. Adding --version to mc command will couse mc just to print some stuff and it will exit after that. |
|
Back to top |
|
|
(l)user Guru
Joined: 31 Jan 2004 Posts: 334 Location: Poland
|
Posted: Fri Aug 12, 2005 4:34 pm Post subject: Re: chroot jail |
|
|
prymitive wrote: |
You must run "mc --version" not only mc becouse jail executes the app You tell him to add and waits for that app to finish, so if You just type "mc" it will run it and You will wait forever becouse mc won't quit itself. Adding --version to mc command will couse mc just to print some stuff and it will exit after that. |
Thanks that did it, now how i do i access network? _________________ Registered Linux user #302020
Gadu Gadu #490092 |
|
Back to top |
|
|
prymitive Apprentice
Joined: 13 Jun 2004 Posts: 260
|
Posted: Fri Aug 12, 2005 4:40 pm Post subject: Re: chroot jail |
|
|
Quote: | Thanks that did it, now how i do i access network? |
If You want to use irc app from within the chroot then add this app to the chroot, that should be all, maybe You will need copy of /etc/resolv.conf, but I'm not sure. |
|
Back to top |
|
|
(l)user Guru
Joined: 31 Jan 2004 Posts: 334 Location: Poland
|
Posted: Fri Aug 12, 2005 4:50 pm Post subject: Re: chroot jail |
|
|
prymitive wrote: |
If You want to use irc app from within the chroot then add this app to the chroot, that should be all, maybe You will need copy of /etc/resolv.conf, but I'm not sure. |
yeah its something with nameservers... BitchX 140.211.166.4 works but BitchX irc.frenode.net
doesn't
Code: |
Unable to connect to port 6667 of server irc.freenode.net: No such file or directory
|
copying /etc/resolf.conf into /home/chroot/etc didn't help
ideas? _________________ Registered Linux user #302020
Gadu Gadu #490092 |
|
Back to top |
|
|
prymitive Apprentice
Joined: 13 Jun 2004 Posts: 260
|
Posted: Fri Aug 12, 2005 4:53 pm Post subject: Re: chroot jail |
|
|
(l)user wrote: | prymitive wrote: |
If You want to use irc app from within the chroot then add this app to the chroot, that should be all, maybe You will need copy of /etc/resolv.conf, but I'm not sure. |
yeah its something with nameservers... BitchX 140.211.166.4 works but BitchX irc.frenode.net
doesn't
Code: |
Unable to connect to port 6667 of server irc.freenode.net: No such file or directory
|
copying /etc/resolf.conf into /home/chroot/etc didn't help
ideas? |
None, zero, null, I have played only few minutes with jail, didn't used it yet, sorry. Good luck with it |
|
Back to top |
|
|
(l)user Guru
Joined: 31 Jan 2004 Posts: 334 Location: Poland
|
Posted: Fri Aug 12, 2005 5:54 pm Post subject: |
|
|
Code: |
-jail-3.00$ ftp ftp.kernel.org
ftp: ftp.kernel.org: Name or service not known
ftp> exit
-jail-3.00$ host ftp.kernel.org
ftp.kernel.org is an alias for zeus-pub.kernel.org.
zeus-pub.kernel.org has address 204.152.191.37
zeus-pub.kernel.org has address 204.152.191.5
-jail-3.00$ ftp 204.152.191.37
Connected to 204.152.191.37 (204.152.191.37).
220 Welcome to ftp.kernel.org.
Name (204.152.191.37:user):
|
mhmm.....wierdd?? _________________ Registered Linux user #302020
Gadu Gadu #490092 |
|
Back to top |
|
|
(l)user Guru
Joined: 31 Jan 2004 Posts: 334 Location: Poland
|
Posted: Fri Aug 12, 2005 10:21 pm Post subject: |
|
|
Okay, i found the solution here. Horay! _________________ Registered Linux user #302020
Gadu Gadu #490092 |
|
Back to top |
|
|
|