I'm trying to use graylog with Vagrant in a port forwarded Virtualbox appliance and I'm noticing that every message has 10.0.2.2 as its source IP.
Vagrantfile:
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.hostname = "graylog"
config.vm.network :forwarded_port, guest: 1514, host: 1514, protocol: 'udp'
config.vm.network :forwarded_port, guest: 9000, host: 9000
config.vm.network :forwarded_port, guest: 12900, host: 12900
config.vm.network :forwarded_port, guest: 12201, host: 12201, protocol: 'udp'
config.vm.network :forwarded_port, guest: 12201, host: 12201, protocol: 'tcp'
Example from tcpdump:
15:34:33.986334 IP 10.0.2.2.58556 > graylog.12201: Flags [P.], seq 76983:77640, ack 1, win 65535, length 657
This tells me that Vagrant set up the VM with SNAT and every forwarded packet gets the firewall IP as its source. Is there a way to disable this (use DNAT only) so the source IP of forwarded packets is correct? I don't dare make a bridged network for security reasons: graylog requires a version of Elasticsearch with no support for authentication and the Java version in the official appliance image is quite old.