Graylog port change not held at reboot

Hi - we’re running Graylog version 4.0.5 (single server ova in VMware). we have run a command to redirect port 514 to 1514 which appears to be working… until we reboot the graylog vm… then we get no data. rerunning the command resolves the issue so it looks like the script isnt holding

The command is

Sudo iptables -t nat -A PREROUTING -i ens160 -p udp --dport 514 -j REDIRECT --to-port 1514
is there a way to embed this into a config file or boot script so that we dont have to rerun it ?  

 i've tried to see where this command should be help so it is a permanent setting but cant see it anywhere, or am i missing something obvious and can i just add it to the server conf file ?

Check this:
https://www.cyberciti.biz/faq/how-to-save-iptables-firewall-rules-permanently-on-linux/

2 Likes

thanks muchly - appears to have worked a treat

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.