Tech Support Forum banner
Status
Not open for further replies.

add permanent static route

3K views 0 replies 1 participant last post by  eXtremer 
#1 · (Edited)
Hello,

My clients connect to my VPN server so they could connect to a database sever behind it using an application. Manually I add a static/permanent route:
route -p -4 add 172.220.211.44 mask 255.255.255.255 172.23.0.0 metric 2 if 18

The rule above works every time as expected the application successfully connects to the database server, but if some new interface is being added, maybe some internet dongle or something the app will not connect because the interface may change from 18 to 19 and the other reason is that I want to automate the VPN connection with CMAK

If I simply add this rule: route -p -4 add 172.220.211.44 mask 255.255.255.255 172.23.0.0

..the application will connect but as soon as I disconnect the VPN connection and reconnect it back again again the app will not connect. Why does this happen? What rule will work in any cases ? What I'm doing wrong?

I need any IP from 172.23.0.0 to be able to reach 172.220.211.44

Why do I add 172.23.0.0 ? because clients receive an IP randomly.

Thank you
 
See less See more
Status
Not open for further replies.
You have insufficient privileges to reply here.
Top