EnthusiastXYZ
Limp Gawd
- Joined
- Jun 26, 2020
- Messages
- 221
UDM is not as flexible as USG when it comes to preserving changes made via SSH. There is no config.json file and SSH-set Netfilter IPTables rules reset after router reboots. To get the same flexibility, I need to follow this guide, but I don't know SSH/Linux/Debian enough to figure it out Step 3 ["Copy any shell scripts you want to run to /mnt/data/on_boot.d on your UDM (not the unifi-os shell) and make sure they are executable and have the correct shebang (#!/bin/sh)] . On Raspberry Pi, I use Persistent IPTables and save them via ["sudo bash -c "iptables-save >/etc/iptables/rules.v4"] , but rules.v4 only lists IPTables rules, it isn't in SH script format. I don't know how to write SH scripts...
How do I convert my "rules.v4" into SH script format? How to make them executable and assign to them correct shebang? Once my rules are converted and copied to "/mnt/data/on_boot.d", do I need to do anything else?
How do I convert my "rules.v4" into SH script format? How to make them executable and assign to them correct shebang? Once my rules are converted and copied to "/mnt/data/on_boot.d", do I need to do anything else?
Last edited: