the usage of --up

Scripts with setup, destroy, and modify routing tables and firewall rulesets for client connections.

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

Post Reply
alex.tls
OpenVpn Newbie
Posts: 14
Joined: Fri Nov 12, 2021 11:05 am

the usage of --up

Post by alex.tls » Sun Nov 14, 2021 3:02 pm

I want to run some commands after the tun device is up as below code

Code: Select all

proto tcp4-server
dev tun0
script-security 2
up '/usr/bin/firewall-cmd --zone=trusted --add-interface=tun0'
but it give me more parameters for my specified program as below log.

Code: Select all

Sun Nov 14 22:58:50 2021 /usr/bin/firewall-cmd --zone=trusted --add-interface=tun0 tun0 1500 1623 172.31.0.1 255.255.255.0 init
usage: see firewall-cmd man page
firewall-cmd: error: unrecognized arguments: tun0 1500 1623 172.31.0.1 255.255.255.0 init

Code: Select all

tun0 1500 1623 172.31.0.1 255.255.255.0 init  
this is not my added parameters for firewall-cmd program, any one can tell me why ?

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: the usage of --up

Post by TinCanTech » Sun Nov 14, 2021 3:25 pm

Openvpn adds those parameters automatically. See --up in the manual.

alex.tls
OpenVpn Newbie
Posts: 14
Joined: Fri Nov 12, 2021 11:05 am

Re: the usage of --up

Post by alex.tls » Mon Nov 15, 2021 10:41 am

I have created a new one ,which is more close to my purpose, I want to delete this thread , but I don't' know where I can remove it.

Post Reply