Stane1983
Cadet
- Joined
- Mar 10, 2023
- Messages
- 7
Hi guys,
here is my conf...
TrueNAS CORE version: TrueNAS-13.0-U4.
Service enabled: OpenVPN Server
Jails: Deluge
Please note that everything is working as expected if I manually execute ipfw script (I can access Jails and internal LAN) from shell:
Script won't run if I set it as firewall_script in Tunables or as Init script executed as post init.
After boot my ipfw show looks like this:
And after manually running script it looks like this:
I'm fairly new to TrueNAS but I do have general idea how it should work as I'm long time linux user.
Any ideas?
Thanks,
Stan
here is my conf...
TrueNAS CORE version: TrueNAS-13.0-U4.
Service enabled: OpenVPN Server
Jails: Deluge
Please note that everything is working as expected if I manually execute ipfw script (I can access Jails and internal LAN) from shell:
Code:
#!/bin/sh # Flush out the list before we begin. ipfw -q -f flush # Set rules command prefix cmd="ipfw -q add" # interface name of NIC attached to Internet net="em0" ################################################################# ipfw -q nat 462 config if $net # OpenVPN $cmd 0050 nat 1 all from 10.20.0.1/24 to any out via $net $cmd 0100 nat 1 all from any to any in via $net # Jails $cmd 0050 nat 462 ipv4 from 172.16.0.0/24 to any out via $net $cmd 0100 nat 462 ip4 from any to any in via em0 ipfw -q nat 1 config if $net
Script won't run if I set it as firewall_script in Tunables or as Init script executed as post init.
After boot my ipfw show looks like this:
Code:
00100 246 34488 nat 462 ip4 from 172.16.0.0/24 to any out via em0 00101 961 173901 nat 462 ip4 from any to any in via em0 65535 18031 1422093 allow ip from any to any
And after manually running script it looks like this:
Code:
00050 0 0 nat 1 ip from 10.20.0.0/24 to any out via em0 00050 0 0 nat 462 ip4 from 172.16.0.0/24 to any out via em0 00100 10 660 nat 1 ip from any to any in via em0 00100 0 0 nat 462 ip4 from any to any in via em0 65535 18292 1472380 allow ip from any to any
I'm fairly new to TrueNAS but I do have general idea how it should work as I'm long time linux user.
Any ideas?
Thanks,
Stan