Automatically put on alliases on tun interface
Posted: Mon Jan 03, 2011 3:26 pm
Hello, i have one problem
I have a lot of linux/bsd clients on my vpn servers and each client beside the ip i push in ccd using ifconfig-push can have several iroutes, which i use to route different ip`s and subnets.
Now when i add an iroute to ccd i need to edit the up script on the client side where i ad "ip rule" rules and aliases configuration like "ifconfig tun0:0" .
I want to make that automatically.
I thought i can use the "route_{parm}_{n}" enviromental variables to grep the ips and netmask which i have "irouted" using iroute in ccd and put them using ifconfig on the client in a while cycle.
I have created ccd with one ifconfig-push and one iroute directives and in up script on client side i have printed route_network_1 and route_network_2 to the file.
First parameter was equal to the ip address of the openvpn server gateway ip and the second one was empty. Probably i misunderstand the meaning of that parameter, so i should solve the problem using another way.
Please help me,
Really tired off editing up scripts on client servers each time i add/remove IPs from their ccd`s
I have a lot of linux/bsd clients on my vpn servers and each client beside the ip i push in ccd using ifconfig-push can have several iroutes, which i use to route different ip`s and subnets.
Now when i add an iroute to ccd i need to edit the up script on the client side where i ad "ip rule" rules and aliases configuration like "ifconfig tun0:0" .
I want to make that automatically.
I thought i can use the "route_{parm}_{n}" enviromental variables to grep the ips and netmask which i have "irouted" using iroute in ccd and put them using ifconfig on the client in a while cycle.
I have created ccd with one ifconfig-push and one iroute directives and in up script on client side i have printed route_network_1 and route_network_2 to the file.
First parameter was equal to the ip address of the openvpn server gateway ip and the second one was empty. Probably i misunderstand the meaning of that parameter, so i should solve the problem using another way.
Please help me,
Really tired off editing up scripts on client servers each time i add/remove IPs from their ccd`s
