Page 1 of 1

Bug in iptables-openvpn.service

Posted: Fri Mar 31, 2023 4:40 pm
by gerhard-wien
As I am new to this forum, I hope I have selected the correct forum.

I noticed that the iptables rules in /etc/iptables/add-openvpn-rules.sh didn't get applied at system boot.
However, after "systemctl restart iptables-openvpn" everything was fine.

From what I found, i assume that the service is triggered before iptabels is initialized:
To test it I inserted:

Code: Select all

iptabels-save > /tmp/test 
as the first command in add-openvpn-rules.sh and got an empty file.

I modified iptables-openvpn.service to make it work:

Code: Select all

#Before=network-online.target
After=network-online.target
Gerhard