jails can't access internet from within jails

/etc/jails.conf:
Code:
firefox {
path = "/root/jails/firefox";
ip4.addr = "10.0.0.201";
host.hostname = "firefox";
interface = "wlan0";
mount.devfs;
allow.raw_sockets;
exec.clean;
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
}

/root/jails/firefox/etc/resolv.conf:
Code:
nameserver 1.1.1.1

I didn't changed anything else. What do I do to get it working?
 
Last edited by a moderator:
/etc/resolv.conf:

I didn't changed anything else. What do I do to get it working?
You want to set /etc/resolv.conf for the host too?
How about inserting this line - security.jail.allow_raw_sockets=1 # (default 0) - in /etc/sysctl.conf?

Reference:
 
In /etc/jail.conf i have:
Code:
path = "/jails/$name";
host.hostname = "$name";
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
exec.clean;
persist;
ip4 = inherit;
ip6 = inherit;
mount.devfs;
mount.fdescfs;
enforce_statfs=1;
allow.socket_af;
allow.raw_sockets;
 
ip4 = inherit;
well, it works with this setting but how do I get it work without giving "unrestricted access to all system addresses"? Why doesn't the default working?

ip4 Control the availability of IPv4 addresses. Possible values are
"inherit" to allow unrestricted access to all system addresses,
"new" to restrict addresses via ip4.addr, and "disable" to stop
the jail from using IPv4 entirely. Setting the ip4.addr parame-
ter implies a value of "new".
 
Back
Top