Page 1 of 1

the usage of --up

Posted: Sun Nov 14, 2021 3:02 pm
by alex.tls
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 ?

Re: the usage of --up

Posted: Sun Nov 14, 2021 3:25 pm
by TinCanTech
Openvpn adds those parameters automatically. See --up in the manual.

Re: the usage of --up

Posted: Mon Nov 15, 2021 10:41 am
by alex.tls
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.