How can I disable internet access for docker containers
<p>I'm trying to run untrusted code inside a docker container and prohibit internet access for it.</p>

<p>I've already tried <code>iptables -I DOCKER -i docker0 -j DROP</code>                 </p>

<pre><code>iptables: No chain/target/match by that name.
</code></pre>

<p>Result of <code>lsb_release -a</code></p>

<pre><code>No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 15.04
Release:    15.04
Codename:   vivid
</code></pre>

<p>Result of <code>docker images</code></p>

<pre><code>REPOSITORY                 TAG                 IMAGE ID            CREATED              VIRTUAL SIZE
virtual_machine            latest              5f2b8cea6752        3 months ago         2.795 GB
chug/ubuntu14.04x64        latest              81b68b976893        2.087208 years ago   224.7 MB
</code></pre>

<p>Find the project for reference <a href="https://github.com/remoteinterview/compilebox" rel="noreferrer">here</a> </p>