Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Plain Text by Prabas ( 17 years ago )
Viska darome su [url=www.putty.org]PuTTY[/url]

Tai skirta UNIX serverių vartotojams. Ir tai geriau nei public VPN'ai nes jie nera greiti, o sis priklausys nuo jusu serverio gaunamo srauto.

Install pptpd.
[quote]apt-get install pptpd bcrelay ppp iptables[/quote]

Redaguojam pptpd config
[quote]nano /etc/pptpd.conf[/quote]

Apačioj rasit
[quote]
# (Recommended)
#localip 192.168.0.1
#remoteip 192.168.0.234-238,192.168.0.245
# or
#localip 192.168.0.234-238,192.168.0.245
#remoteip 192.168.1.234-238,192.168.1.245[/quote]

Ištrinkit 3 eilutes ir paredaguokit. Viskas turėtų atrodyti štai taip
[quote]# (Recommended)
localip 192.168.0.1
remoteip 192.168.5.1-254[/quote]

CTRL+X and save

Kuriame vartotojus
[quote]nano /etc/ppp/chap-secrets[/quote]

Viskas atrodys taip
[quote]# Secrets for authentication using CHAP
# client        server  secret                  IP addresses[/quote]

Pridėkit vartotoją, pvz. [b]admin[/b], su [b]admin[/b] slaptažodžiu kur IP pridekit * (universal)

Viskas atrodys taip
[quote]# Secrets for authentication using CHAP
# client        server  secret                  IP addresses
admin           pptpd   admin                   *[/quote]

Galit pridėti daugiau vartotoju, tiesiog žemiau admin'o prirašykit norimus vartotojus

Restart pptpd
[quote]/etc/init.d/pptpd restart[/quote]

[size=3]Sveikinu, jūs susikūrėte VPN![/size]

Bet pirma patikrinkim pora dalykų
[quote]cat /proc/sys/net/ipv4/ip_forward[/quote]

Jei gausit 1 - viskas OK, jei 0 - skaitykit žemiau
[quote]echo 1 > /proc/sys/net/ipv4/ip_forward[/quote]
[quote]nano /etc/sysctl.conf[/quote]

Rasit tokią eilutę (Line 28)
[quote]# Uncomment the next line to enable packet forwarding for IPv4
#net.ipv4.ip_forward=1[/quote]

Nuimkit [b]#[/b]. Viskas turėtų atrodyti taip
[quote]# Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1[/quote]

Pasidarom "iptables" script'ą
[quote]cd /root/
nano vpnf.sh[/quote]

vpnf.sh faile pridėkit
[quote]#!/bin/sh
# Flush all rules
iptables -F
iptables -X
iptables -Z
# Allow all VPN stuff
iptables -A INPUT -p tcp --dport 1723 -j ACCEPT
iptables -A INPUT -p 47 -j ACCEPT
iptables -A OUTPUT -p tcp --sport 1723 -j ACCEPT
iptables -A OUTPUT -p 47 -j ACCEPT
iptables -A FORWARD -i ppp0 -o eth0 -s 192.168.5.0/24 -m state --state NEW -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A POSTROUTING -t nat -o eth0 -j MASQUERADE[/quote]

CTRL+X and save

CHMOD
[quote]chmod +x vpnf.sh
./vpnf.sh[/quote]

Kaip prisijungt prie VPN: [url=http://www.linkomanija.net/forums.php?action=viewtopic&topicid=42335]spaudžiam čia[/url]

 

Revise this Paste

Your Name: Code Language: