cricketspacexdragon
Cadet
- Joined
- May 10, 2022
- Messages
- 4
Hello, I have a TrueNAS SCALE installation (TrueNAS-SCALE-22.12-MASTER-20220902-034233, but this applies to other non nightly builds as well) where I need some custom iptables entries in order to route network traffic locally instead of over the net. I use a pi-hole hairpin DNS entry in order to do this and have to do some port remapping. Here are the entries:
My question is how do I save these entries to the config database so they persist through a reboot? I checked the API documentation (Settings > API Keys > API Docs), and didn't find anything that looked like it would. Has anyone ever saved something like this?
Code:
iptables -A PREROUTING -t nat -i eno1 -p tcp --dport 443 -j DNAT --to 192.168.1.2:9443 iptables -A FORWARD -p tcp -d 192.168.1.2 --dport 9443
My question is how do I save these entries to the config database so they persist through a reboot? I checked the API documentation (Settings > API Keys > API Docs), and didn't find anything that looked like it would. Has anyone ever saved something like this?