Skip to content

Frequently Asked Questions FAQ

Denis Salopek edited this page Feb 10, 2020 · 2 revisions

Can I install <package> and run it inside IMUNES nodes?

Yes, you can! If the <package> is in the official repositories and you have an Internet connection, you can run:

$ pkg_imunes install <package> on FreeBSD or

$ sudo apt-get_imunes install <package>on Linux.

If you need to install something that's not in the repository (or you don't have an Internet connection), on FreeBSD you can:

  1. copy all the necessary files to the IMUNES virtual root filesystem (default is /var/imunes/vroot), e.g. /var/imunes/vroot/root/package
  2. chroot into the IMUNES virtual root and position yourself in /root/package
  3. install the package as you normally would

On Linux, you have to run the IMUNES docker container (default is imunes/template) in the interactive terminal mode, transfer all the necessary files (e.g. via mounting a volume) and build it as you normally would. Then, you need to docker commit the running image as imunes/template (or any other name if you don't want to overwrite the default IMUNES image).

What is the difference between External connection node and External interface node?

It would probably be easier to answer this question with the next two questions, so read ahead. Both of them will be using this example topology:

External connection/interface example

How can I connect my host computer (the one running IMUNES) to an IMUNES topology?

Suppose you have a topology like the one pictured above, with a WEB and a MAIL servers connected in a local network via a switch (switch1) and you want your host computer to join this LAN. From the left-side IMUNES toolbar, click on Add new network layer node and then External connection. Place it on the canvas (ext1 node should appear) and connect it with the switch1 node using the link tool. It should receive an IP address from the LAN subnet. You can change this address in the Configuration dialog box for this node. Execute the experiment. There should now be a new interface and a new route on your host computer, and if an IPv4/IPv6 addresses are configured as non-empty values, you should see those values set:

[root@IMUNES ~/imunes]# ifconfig i42a80-n6
i42a80-n6: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 42:00:aa:5b:84:00
        inet netmask 0xffffff00 broadcast
        inet6 fe80::4000:aaff:fe5b:8400%i42a80-n6 prefixlen 64 scopeid 0x5
        inet6 fc00::20 prefixlen 64
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active

[root@IMUNES ~/imunes]# netstat -rn4
Routing tables

Destination        Gateway            Flags     Netif Expire        link#5             U      i42a80-n          link#5             UHS         lo0

If you now ping the MAIL node from your host computer, you will get a reply:

[root@IMUNES ~/imunes]# ping -c 1
PING ( 56 data bytes
64 bytes from icmp_seq=0 ttl=64 time=0.041 ms

--- ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.041/0.041/0.041/0.000 ms

To reach every subnet in your topology from your computer, you need to manually add every route or set a default route as the router node FIREWALL (

How can I connect a running IMUNES topology to the internet?

Suppose you have a topology like the one pictured above and you need the test-PC node to connect to a remote site somewhere on the internet. From the left-side IMUNES toolbar, click on Add new link layer node and then External interface. Place it on the canvas (UNASSIGNED node should appear) and connect it with the test-PC node using the link tool. Double click on the new node and select a Physical interface from the dropdown menu: you want to select an interface connected to the internet.

NOTE: when you run the experiment, this interface will be 'stolen' from your host computer and it will no longer have access to it - make sure this interface is not the main interface for connecting to the internet, otherwise you will lose the connection.

Also, configure the new interface eth1 IP/MAC addresses and its default route to have an IP address and default route from the subnet of whatever you are connecting it to or delete it if you use DHCP on the test-PC node.

NOTE: the eth1 interface of test-PC node needs to have the same MAC address as the interface you are 'stealing'.

Ping or any other address from the test-PC node or if you use DHCP, first run:

root@test-PC:/ # dhclient eth1

to get an IP address and you are good to go.