jadedeane / natanator

Unifi OS persistent network modification service
26 stars 5 forks source link

Not working on UDM-SE (3.2.12) #9

Open daNutzzzzz opened 2 months ago

daNutzzzzz commented 2 months ago

Hi,

Firstly thanks for your work as view just had the requirement to disable NAT and found this really helpful, unfortunately for me its not working.

If i run your command:

iptables -t nat -L UBIOS_POSTROUTING_USER_HOOK | grep "MASQUERADE .* UBIOS_.*ADDRv4_eth." I get no results.

Here is the revenant section of mmy NAT tables:

Chain UBIOS_POSTROUTING_USER_HOOK (1 references)
target     prot opt source               destination
MASQUERADE  all  --  anywhere             anywhere             ! match-set UBIOS_ALL_ADDRv4_ppp0 src /* 00000001095216660481 */
NFLOG      udp  --  anywhere             10.0.9.40            match-set UBIOS_ALL_NETv4_br1009 src udp dpt:51820 limit: avg 50/sec burst 100 nflog-prefix  "[POSTROUTING-MASQUERADE-3] DESCR=\"PortForward MASQUERADE [Wire\"" nflog-threshold 16
MASQUERADE  udp  --  anywhere             10.0.9.40            match-set UBIOS_ALL_NETv4_br1009 src udp dpt:51820 /* 00000000008589934595 */
NFLOG      tcp  --  anywhere             10.0.9.40            match-set UBIOS_ALL_NETv4_br1009 src tcp dpt:39091 limit: avg 50/sec burst 100 nflog-prefix  "[POSTROUTING-MASQUERADE-5] DESCR=\"PortForward MASQUERADE [SCRY\"" nflog-threshold 16
MASQUERADE  tcp  --  anywhere             10.0.9.40            match-set UBIOS_ALL_NETv4_br1009 src tcp dpt:39091 /* 00000000004294967301 */
daNutzzzzz commented 2 months ago

Just to say i obviously got this working by changing your code as you only search for ADDRv4_eth where as my interface is ADDRv4_ppp0. would be good if you could update to account for both types.