N
newsreader
here goes
say we have one nic on 100.100.100.100 and second nic on 150.150.150.150
gateway from 150.150.150.150 to 100.100.100.100 works fine and everything is
happy
we are on 150 and want to surf the net for example everything is fine. out
through the 100 gateway
dial up comes on for a third party server and gets a dynamic IP say
200.200.200.200 (no gateway established) as there is already a default
gateway else where.
now lets say that when that connection happens I want to direct a specific
IP on 150 to that newly obtained IP only say 150.150.150.149
if I manually add a route like
route add 150.150.150.149 mask 255.255.255.255 200.200.200.200
everything works as expected
a request to 150.150.150.* goes to 100.100.100.100 via the default gateway
except if the request is to the specific ip of 150.150.150.149 it now goes
to the 200.200.200.200 system.
all is well
question is how can I perform the "route add" automatically based on the
single dynamic ip that the dial up obtains when the connection is
established.
(No the service does not provide a static IP, that would be too easy)
when the connection drops we need the route of 150.150.150.149 to go away
(and it does)
the next time it dials we may get 200.200.200.201 as the assigned IP
so now the route add 150.150.150.149 mask 255.255.255.255 200.200.200.201 is
required
is there a way I can have a post dial or login script on the dial account
create the route based on the ip is gets assigned ?
failing that can someone direct me to the routing table access API, (or
..NET)
when the dial connection is established, I need to redirect a single ip on
one side away from its normal gateway and send it to the ip that the dial up
connection was handed.
it all works if I do it by hand, I just need to automate it
Thanks
say we have one nic on 100.100.100.100 and second nic on 150.150.150.150
gateway from 150.150.150.150 to 100.100.100.100 works fine and everything is
happy
we are on 150 and want to surf the net for example everything is fine. out
through the 100 gateway
dial up comes on for a third party server and gets a dynamic IP say
200.200.200.200 (no gateway established) as there is already a default
gateway else where.
now lets say that when that connection happens I want to direct a specific
IP on 150 to that newly obtained IP only say 150.150.150.149
if I manually add a route like
route add 150.150.150.149 mask 255.255.255.255 200.200.200.200
everything works as expected
a request to 150.150.150.* goes to 100.100.100.100 via the default gateway
except if the request is to the specific ip of 150.150.150.149 it now goes
to the 200.200.200.200 system.
all is well
question is how can I perform the "route add" automatically based on the
single dynamic ip that the dial up obtains when the connection is
established.
(No the service does not provide a static IP, that would be too easy)
when the connection drops we need the route of 150.150.150.149 to go away
(and it does)
the next time it dials we may get 200.200.200.201 as the assigned IP
so now the route add 150.150.150.149 mask 255.255.255.255 200.200.200.201 is
required
is there a way I can have a post dial or login script on the dial account
create the route based on the ip is gets assigned ?
failing that can someone direct me to the routing table access API, (or
..NET)
when the dial connection is established, I need to redirect a single ip on
one side away from its normal gateway and send it to the ip that the dial up
connection was handed.
it all works if I do it by hand, I just need to automate it
Thanks