Page 1 of 1

Running iptables after successfull client connection

Posted: Thu May 25, 2017 12:48 pm
by MatejKovacic
I have OpenVPN server on Mikrotik. I am connecting to this server via Debian machine (a client). After successful connection server pushes route to a client.

Right after that, I would like to run iptables script. So after client establish successful connection, I would like to run iptables on a client.

(The reason is, that client is actually a server with several subnets, and I don't want new openvpn route be accessible to all subnets).

Re: Running iptables after successfull client connection

Posted: Thu May 25, 2017 12:58 pm
by TinCanTech
To run a script when a client connects ..
  • on the server use --client-connect
  • on the client use --up