Running iptables after successfull client connection

Scripts with setup, destroy, and modify routing tables and firewall rulesets for client connections.
Post Reply
MatejKovacic
OpenVPN User
Posts: 30
Joined: Wed Jun 19, 2013 9:43 am

Running iptables after successfull client connection

Post by MatejKovacic » Thu May 25, 2017 12:48 pm

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).

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 4196
Joined: Fri Jun 03, 2016 1:17 pm

Re: Running iptables after successfull client connection

Post by TinCanTech » Thu May 25, 2017 12:58 pm

To run a script when a client connects ..
  • on the server use --client-connect
  • on the client use --up

Post Reply