Iptables.service and NFS troubles

  • Hello and greetings!

    I posted on this forum a year or so ago and here is the thread: NFS IPtables Troubles

    I was invoking iptables through an autostart script and everything worked fine with NFS. . . for a while. I want to start iptables through systemd and I referenced this thread as it included iptables.service setup instructions: VPN: Include default iptables rule for tun0 or at least optional

    I want to invoke it through systemd as I want iptables started before my network is online. I followed the instructions for creating the iptables.service and iptables starts fine as I am totally unable to ssh into the box (which is good for me). My NFS mounts unfortunately do not mount. Here are my sample configuration files:

    iptables.service

    nfs mount:

    and finally my iptables.rules:

    Code
    *filter
    -P INPUT DROP
    -P FORWARD DROP
    -P OUTPUT ACCEPT
    -A INPUT -i lo -j ACCEPT
    -A OUTPUT -o lo -j ACCEPT
    -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
    COMMIT

    I believe my problem essentially comes down to something like After=Network-online.service interfering with something. Any help or insight would be sincerely appreciated! My client is an Odroid C2.

  • I ended up posting on reddit as this was not getting any action. I essentially kept the iptables.service through systemd and then mounted my NFS shares through the autostart script using the below code. It includes a command at the beginning that delays the start of the script by several seconds. Below the code will also be the reddit post if anybody wants to take a look.

    Here is the reddit post: iptables.service and NFS- Unresolved forum post : libreELEC

    Shoutout to ChickenGoes2Library for all of the help.