We help IT Professionals succeed at work.

on-demand VPN using ssh and ppp

soulmate022700
on
I already created a script that initiates a vpn with ppp through ssh.

The constuction of the script is:
1. kill ssh processes that is used for vpn.
2. initiate ssh
3. initiate ppp
3. add route
4. flush and reset firewall rules
 
Now I want to make it on-demand, instead of running the script manualy.

How?
Comment
Watch Question

CERTIFIED EXPERT

Commented:
you need a default route pointing to the right device,
then use ip-up (or similar) which is invoked by pppd and write whatt you like/need in there

Author

Commented:
Well That's the problem, ssh has to be invoked first because it creates a pseudo tty where pppd has to tunnel through.
CERTIFIED EXPERT

Commented:
just to clarify:
   you invoke ssh on host A to connect to host B
   then you tunnel PPP through ssh and connect to B too

means that you already have a connection to B
Why do then need to setup PPP on demand?
CERTIFIED EXPERT
Commented:
Sounds like you are trying to re-invent the wheel.  Why not just use IPsec (i.e. FreeSWAN)?  

-Jon

CERTIFIED EXPERT

Commented:
oops, should have looked at the topic: **linux** networking
http://www.freeswan.org/ should do it, just to complete Jon's suggestion.
CERTIFIED EXPERT

Commented:
Ahoffman - hehe (I still expect that the answer will be "I need to connect with some Mickeysoft something or other"  [which tends to deep-six a lot of pure linux solutions], since Big Brother Bill loves to ignore computing standards at the expense of the (computing) free world, in order to inflate his own wallet).

I may yet be pleasantly surprised.

-Jon
CERTIFIED EXPERT

Commented:
LOL
but FreeS/WAN ('cause it's free) works with M$ clients too, sometimes, somehow ... (see PGPNet 7.03)
soulmate:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.