Solved Jail not connecting to internet

My jail doesn't seem to connect to the internet

Here are the settings :

/etc/jail.conf
Code:
exec.start="/bin/sh /etc/rc";
exec.stop="/bin/sh /etc/rc.shutdown";
exec.clean;
#mount.devfs;

test{
    path="/jails/test";
    mount.devfs;
    ip4.addr="192.168.0.115";
    allow.raw_sockets="1";
}

Errors :
Code:
pkg update
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:13:amd64/quarterly, please wait...
pkg: Error fetching http://pkg.FreeBSD.org/FreeBSD:13:amd64/quarterly/Latest/pkg.txz: Non-recoverable resolver failure
Address resolution failed for http://pkg.FreeBSD.org/FreeBSD:13:amd64/quarterly.
Consider changing PACKAGESITE.
.....
ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
^C
--- 8.8.8.8 ping statistics ---
54 packets transmitted, 0 packets received, 100.0% packet loss
....

There was no /etc/resolv.conf in the jail - copying the host (which has internet working on wifi) didn't help resolving the issue.

What can be done to fix it?
 
Not sure how to delete this - I realised this was more appropriate in general and not a server post anyways.

How can I delete this post?
 
I realised this was more appropriate in general
No, it isn't. It's fine right here in emulation and virtualization. Deleted the other post, please don't post the same question multiple times. We'll move the thread if necessary.

As for your issue, your jail isn't bound to an interface.
 
No, it isn't. It's fine right here in emulation and virtualization. Deleted the other post, please don't post the same question multiple times. We'll move the thread if necessary.
Ok, thanks - I'm not sure how to delete it - I tried the options on the right hand top corner but deleting wasn't what showed up. Maybe I'm missing something.
As for your issue, your jail isn't bound to an interface.
Hmm - so my jail's /etc/resolv.conf has the following contents

nameserver 8.8.8.8
nameserver 192.168.0.1
nameserver 127.0.0.1
#options edns0


Not sure how to proceed ?
 
Hmm - so my jail's /etc/resolv.conf has the following contents
That is irrelevant, if the jail isn't connected to the outside world those settings won't magically make it work.

Is the 192.168.0.115 address in the same range as the host? Then just add interface= and bind the jail to the external interface of the host.
 
That is irrelevant, if the jail isn't connected to the outside world those settings won't magically make it work.

Is the 192.168.0.115 address in the same range as the host? Then just add interface= and bind the jail to the external interface of the host.
thanks - adding the following line to the jail.conf made it work. Yes it's in the same range, configured from 192.168.0.100-200 for devices on the wifi network.
interface="wlan0";
 
Back
Top