Running PPPD with SSH (the simplest Linux VPN)
Sbaa 2003.1.10
I am in order to pass the UDP packet firewall on the QQ
Tried a lot of ways.
With snake SOCKS5 agent good, you can have the extranet machine is Windows
And Linux, Stunnel just forward TCP does not support QQ UDP
So I thought about the VPN pptpd is a very good, Windows-enabled VPN client
Unfortunately, the firewall to open IP forwarding, also does not meet my requirements,
Today saw a SSH-PPP script, and then read some articles, originally so simple!!
As long as you have two Linux online with sshd service, you can access the firewall
Build VPN!
My home dial-up machine ADSL is dynamic domain name sbaa.3322.org
My Company a Linux intranet (10.9.0.16) through the company's gateway NAT can access to sbaa.3322.org (SSH)
There are pppd conditions on both machines ok!
Begin:
On the home machine.
Useradd VPN
Ssh-keygen
Enter file in which to save the key (/root/.ssh/identity): Vpnkey
Now we have Vpnkey and vpnkey.pub.
Configure Sshd/etc/ssh/sshd_config
Open Rsaauthentication Yes
CP Vpnkey.pub/home/vpn/.ssh/authorized_keys
Add the following content to the/etc/sudoers
Cmnd_alias VPN=/USR/SBIN/PPPD
VPN All=nopasswd:vpn
All right
To the company machine, put the Vpnkey ftp over here
Test
See Prompt login success everything's OK.
Ssh-l vpn-i./vpnkey-1-P sbaa.3322.org
Linux 2.2.14.
cool:~$ exit
Logout
Connection to sbaa.3322.org closed.
Create the following script
Vpnstart
#!/bin/sh
# VPN Ppp-ssh Script
# History
# May 2002 j.n.pritchard@brad.ac.uk
# *******************************************
# You'll need to edit in these Varibles
# Server Hostname
server_hostname=sbaa.3322.org
# Username on the server for VPN
Server_username=vpn
There are some configurations you can change yourself.
And then./vpnstart Start
Oh
Ifconfig-a See 192.168.6.2?
Ping 192.168.6.1 is my sbaa.3322.org.
Not bad
Add on the sbaa.3322.org
Route add-net 10.9.0.0 netmask 255.255.248.0 GW 192.168.6.2
Then go to my company's Windows machine and add
Route add 192.168.6.1 Mask 255.255.255.255 10.9.0.16
Ping 192.168.6.1 Oh, cartoon.
Then QQ on my sbaa.3322.org SOCKS5 agent
Oh upd package in the SSH link is encrypted encapsulated
The firewall has been crossed.
That's a good idea! Unfortunately, I didn't find it myself, I also saw the SSH-PPP script on the Internet.
And then I studied it.
Oh!
Linux on the VPN incredibly simple!
We have any ideas, but also hope that a lot of exchanges!
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.