On Sun, 29 Oct 2000, Stefan Aeschbacher wrote:

> I am running 4.1-stable updated ca 22.10.00.
> I set up a jail, started it but I have no network at all.
> I made an alias for the used IP address, I ran /etc/rc
> with the following output:

<snip>

How are you starting the jail? I use this in my boot scripts (single line):

/usr/sbin/jail /u2/xxx.xxx.xxx.195 some.domain.com xxx.xxx.xxx.195 /bin/sh /etc/rc

> ping doesnt work from within the jail (I assume this is normal)

Yep, I was looking into that and the archives revealed that it was a
non-trivial fix for a minor problem.

> jail# telnet localhost - doesnt work
> jail# telnet some address - doesnt work
> some host# telnet jail - doesnt work
> some host# ping jail - doesnt work (should it?)
> 
> any hint?

If you can't ping the jail's IP from another machine, I'd suspect that the IP
isn't aliased properly. Here's what I've got setup in /etc/rc.conf:

ifconfig_fxp0="inet xxx.xxx.xxx.192  netmask 0xffffff00"
ifconfig_fxp0_alias0="inet xxx.xxx.xxx.193 netmask 0xffffffff"
ifconfig_fxp0_alias1="inet xxx.xxx.xxx.194 netmask 0xffffff00"
ifconfig_fxp0_alias2="inet xxx.xxx.xxx.195 netmask 0xffffff00"
route_0="xxx.xxx.xxx.193 -iface lo0"
route_1="xxx.xxx.xxx.194 -iface lo0"
route_2="xxx.xxx.xxx.195 -iface lo0"

(And yes, I know that one of the aliases has a /32 netmask and the other two
have a /24 - I was experimenting and there doesn't seem to be a difference)

The routes are something I picked up from reading the archives, they allow
processes in the jail to communicate with the host (mysql, in my case).

Another one that caught me was having /etc/resolv.conf setup properly inside
the jail, otherwise things like telnet will sit and spin trying to do hostname
lookups.

---
Jon Simola <[EMAIL PROTECTED]> | "In the near future - corporate networks
    Systems Administrator     |  reach out to the stars, electrons and light 
     ABC  Communications      |  flow throughout the universe." -- GITS



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to