BizarNet - Internet prin Satelit

DESPRE SERVICII PRODUSE DISTRIBUITORI SUPORT CONTACT

HOME

  Sunteti in: Home > Servicii > Internet prin satelit > One Way > Documentatie online > Setare VPN linux
   English version
  

SERVICII

  • Internet prin satelit

ONE WAY

ONE WAY ISP TWO WAY SMALL ISP TWO WAY AFRICA
Scurta prezentare | Detalii tehnice | Test Bandwidth | Documentatie on-line | Studiu de caz | Preturi Distribuitori | Echipament | Acoperire | Cerere cont de TEST | Cerere cont COMERCIAL
 

Setare VPN linux - Documentatie on-line - Internet prin satelit One Way

Aceasta documentatie va este oferita fara nici o alta obligatie si nu ne asumam nici o responsabilitate legata de utilizarea ei.

VERSIUNEA TEXT

***********************************************************************
***   DOCUMENTATIE DE CONFIGURATIE PENTRU CONECTARE VPN-BizarNet        ***
***                                                    Linux                                                      ***
***                           Made By Cristian Raica (chris@sar.ro)                                ***
***********************************************************************

#!/bin/bash
# by Cristian Raica (:Chris Remy:) chris@sar.ro 06/2002
# Works on linux kernel >= 2.4 
# Run this script as root
# You need (pptp) (ip) (squid)
# Configuration of dvb is standard 
# This is for routing packets to vpn only for proxy web 
# (squid on gateway server)
# All other trafic is normal routing to default gateway (eth0)


# Conect to server pptp with user xxx (your user account)
/sbin/pptp hsi.xanticbroadband.com user xxx
echo wait 10 seconds ...
sleep 10

# Get the local and remote IP of vpn
LOCALIP=`ip route show dev ppp0 | awk '{print $7}'`
REMOTEIP=`ip route show dev ppp0 | awk '{print $1}' `

# if no dev ppp0 exit
if [ "$LOCALIP" == "" ]; then
echo ppp0 not found.
exit 1
fi

echo Local IP : $LOCALIP
echo Remote IP : $REMOTEIP
echo -------------------

# This is the magic
# Put in /etc/iproute2/tables this line
# 200 vpn
# Add the default route for vpn the new gateway of remoteip on dev ppp0

ip route add default table vpn dev ppp0 via $REMOTEIP
ip route show table vpn
ip route flush cache

# Save old IP for first time run this not exist; don't worry;
OLDIP=`ip rule | awk '{ if ($5=="vpn") {print $3}}'`

# erase the old rule and add the new rule ( becose not exist the command 
# replace)
ip rule del from $OLDIP pref 200 table vpn

# Add this new rule : all packets with source IP = LOCALIP routing -> 
# REMOTEIP (table vpn)
ip rule add from $LOCALIP pref 200 table vpn
ip rule show

# This is for squid change the line tcp_outgoing_address aaa.bbb.ccc.ddd 
# ( the local ip of vpn)
cat /etc/squid/squid.conf | 
awk -vLIP=$LOCALIP '{ if ($1=="tcp_outgoing_address")
{ $2=LIP;}; print $0; } ' > /tmp/squid.tmp ; mv -f /tmp/squid.tmp 
/etc/squid/squid.conf
service squid restart

# And this is for keep alive the vpn conection every 10 minutes
# add in crontab 
# 0-59/10 * * * * root /bin/ping -c 3 -I ppp0 remoteip
cat /etc/crontab | awk -vRIP=$REMOTEIP '{ if ($7=="/bin/ping") 
{ $12=RIP;}; print $0; } ' > /tmp/crontab ; mv -f /tmp/crontab /etc/crontab

# that's not all 

Scurta prezentare | Detalii tehnice | Test bandwidth | Documentatie on-line | Studiu de caz | Preturi Distribuitori | Echipament | Acoperire | Cerere cont de test | Cerere cont comercial

ONE WAY

ONE WAY ISP TWO WAY SMALL ISP TWO WAY AFRICA

Alte servicii:

Support

Wireless
Internet prin satelit
Software
Web design


Forum de discutii
Pe forum puteti discuta diferite probleme legate de internet prin satelit, de web design si web hosting, cuprinzand probleme de instalare, setare, etc...


Intrebari frecvente
Puteti sa ne adresesati o intrebare, sau sa revedeti problemele care le-au avut alti utilizatori privind serviciile de internet prin satelit

Utils

- Test Bandwidth
- Recomanda unui prieten
- Chestionare
- Newsletter

News

We cut-off the prices for unlimited services:
- Check out the new unlimited services prices


Home | Despre | Servicii | Produse | Suport | Distribuitori | Contact | Harta site | Parametrii de Calitate
© 2007 BizarNet - Internet prin Satelit. Toate drepturile rezervate.
Termeni si Conditii
One way Satellite Internet service provider


Firma de web design Cluj-Napoca