Bug in iptables-openvpn.service

This forum is for general conversation and user-user networking.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
gerhard-wien
OpenVpn Newbie
Posts: 2
Joined: Fri Mar 31, 2023 4:22 pm

Bug in iptables-openvpn.service

Post by gerhard-wien » Fri Mar 31, 2023 4:40 pm

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

Post Reply