My container needs to connect to a remote hosts where the ip changes a lot. Therefor the application retrieves the ip via the MAC of that remote host, using nmap and arp.
Nmap is used to ‘ping’ all remote hosts in the HOST’s subnet to build the arptable, and arp -a is used to show the arp-table to get the ip from the remote host
This is working fine when the application was not running as a docker container.
> root@fbc2d6dd42d7:/# arp -a
> ? (172.17.0.1) at 02:42:3f:2d:01:72 [ether] on eth0
is is shown.
Nevertheless the nmap command finds hosts on the other network:
> root@fbc2d6dd42d7:/xagget# nmap -sP 192.168.10.0/24
> Starting Nmap 6.47 ( http://nmap.org ) at 2016-09-02 14:25 UTC
> Nmap scan report for 192.168.10.1
> Host is up (0.00044s latency).
> Nmap scan report for 192.168.10.40
> Host is up (0.013s latency).
> Nmap scan report for PiRob.local (192.168.10.50)
> Host is up (0.00036s latency).
> Nmap scan report for 192.168.10.51
> Host is up (0.000086s latency).
> Nmap scan report for 192.168.10.53
> Host is up (0.00035s latency).
> Nmap scan report for PiBuildStef.local (192.168.10.55)