LINUX.ORG.RU
решено ФорумAdmin

Настройка vpn


0

1

Хочу предупредить, я новичок. Вопрос в следующем, как настроить vpn через 21 порт. В Окнах следующая технология: в реестре я менял TcpIpNumber с 1723 на 21 и было мне счастье. Теперь мне нужно настроить vpn в Fedora 16. Если можно в подробностях :) Заранее благодарен

В конфиге vpn строчку

remote your_provider_name
заменить на
remote your_provider_name 21
Кстати, Ваш провайдер на http по каким портам пускает? :)

backbone ★★★★★
()
30 января 2012 г.

Фух, наконец-то добрался. Да, таки это vpn pptp. Имеем следующее:

Шифрование на сервере отсутствует. Для авторизации используются:

pap

chap

mschap

[root@myhome ppp]# cat options.pptp 
# Lock the port
lock

# Authentication
# We don't need the tunnel server to authenticate itself
noauth

# We won't do PAP, EAP, CHAP, or MSCHAP, but we will accept MSCHAP-V2
# (you may need to remove these refusals if the server is not using MPPE)
refuse-pap
#refuse-eap
refuse-chap
refuse-mschap

# Compression
# Turn off compression protocols we know won't be used
#nobsdcomp
#nodeflate

# Encryption
# (There have been multiple versions of PPP with encryption support,
# choose with of the following sections you will use.  Note that MPPE
# requires the use of MSCHAP-V2 during authentication)

# http://ppp.samba.org/ the PPP project version of PPP by Paul Mackarras
# ppp-2.4.2 or later with MPPE only, kernel module ppp_mppe.o
# {{{
# Require MPPE 128-bit encryption
#require-mppe-128
# }}}

# http://polbox.com/h/hs001/ fork from PPP project by Jan Dubiec
# ppp-2.4.2 or later with MPPE and MPPC, kernel module ppp_mppe_mppc.o
# {{{
# Require MPPE 128-bit encryption
#mppe required,stateless
# }}}
Конфиг самого тунеля:

/etc/ppp/peers/inet

[root@myhome peers]# cat inet 
pty "pptp 10.2.0.39 --nolaunchpppd --nobuffer" 
remotename pptp 
user LOGIN
password "PASS"
linkname inet
lock
usepeerdns 
nodeflate 
nobsdcomp 
noauth
nopcomp
noaccomp 

При попытке соединиться выдает следующее:

[root@myhome ppp]# pppd call inet debug nodetach
using channel 6
Using interface ppp0
Connect: ppp0 <--> /dev/pts/2
anon warn[open_inetsock:pptp_callmgr.c:331]: connect: Connection refused
anon fatal[callmgr_main:pptp_callmgr.c:127]: Could not open control connection to 10.2.0.39
anon fatal[open_callmgr:pptp.c:479]: Call manager exited with error 256
Script pptp 10.2.0.39 --nolaunchpppd --nobuffer finished (pid 4193), status = 0x1
Modem hangup
Connection terminated.

Касательно коннекта именно через 21 порт накопал вот что:

pptp called as:
 pptp hostname [[pptp options] --] [pppd options]

The pptp program does:

gethostbyname([hostname]) to get ip number.

Try to open unix domain socket at /var/run/pptp/ip.num.ber.here.  
If not found, launch call manager for that ip address.

Call manager opens unix domain socket at /var/run/pptp/ip.num.ber.here, does:
  1) Open connection to the ip address using port 1723 protocol.
  2) accept unix domain socket connection. 
     [wait for any pptp call request to this ip]
  3)  On receiving a connection, open CALL to ip.address using port 1723. 
  2)  send callID over unix domain socket for gre encapsulation.
  3)  Keepalive the socket.  When either side closes socket, send
      call-close message to ip.address using port 1723.
  4)  on close of last call, send connection close using port 1723, 
      close the unix domain socket at /var/run/pptp/ip.num.ber.here,
      and exit.

Но никак не соображу каково должно быть содержание этого файла /var/run/pptp/ip.num.ber.here

И как его задействовать?

Budimir
() автор топика
Ответ на: комментарий от backbone

Решение было найдено, достаточно было добавить такое правило:

iptables -t nat -A OUTPUT -p tcp --dport 1723 -j DNAT --to-destination :21

Budimir
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.