Имя:    Пароль:      Помнить меня       
Unsorted   ~  Software  ~  Linux and Unix  ~  FreeBSD Вопросы по FreeBSD.
На страницу «  1, 2, 3, 4, 5, 6  »
jah
Сообщение  14 Фев 2008, 16:04  Ссылка : Ответить с цитатой
Возраст: 42 Пол: Мужской 
C нами с 25.09.2006
Репутация: 77.9

я юзаю mpd для VPN и apinger для реконекта при разрыве связи. настройки не хитрые. поискайте и все найдете.
В начало
Профиль : Личное Сообщение
Selax
Сообщение  14 Фев 2008, 19:16  Ссылка : Ответить с цитатой
Пол: Мужской 
C нами с 06.11.2007
Репутация: 32.5

снеговик писал(а):
Selax, как насчёт спросить гугл?
эта и эта ссылки на первой странице поиска.

мб, если я прошу сказать как у меня нет интернета?
В начало
Профиль : Личное Сообщение
cartman_756
Сообщение  15 Фев 2008, 10:51  Ссылка : Ответить с цитатой
Пол: Мужской 
C нами с 06.05.2007
Репутация: 48.9

Selax писал(а):
снеговик писал(а):
Selax, как насчёт спросить гугл?
эта и эта ссылки на первой странице поиска.

мб, если я прошу сказать как у меня нет интернета?

Первый
Процедура настройки абонентского компьютера PPTP в FreeBsd c использованием mpd

1. Необходимо, чтобы в ядре была включена поддержка NETGRAPH. Если поддержка NETGRAPH уже включена в ваше ядро, переходите к пункту 3.

2. cd /sys/i386/conf
Вставьте следующие строчки в конфигурацию вашего ядра:
options NETGRAPH
options NETGRAPH_PPTPGRE
options NETGRAPH_MPPC_ENCRYPTION
options NETGRAPH_BPF

config <Название>
cd ../compile/<Название>
make dep
make
make install
Перегрузите операционную систему.

3.Установить пакет mpd из портов. cd /usr/ports/net/mpd
make
make install

4. Распаковать архив mpd.tar в дирректорию /usr/local/etc/mpd
tar -xvvf mpd.tar
cp mpd /usr/local/etc
Редактируем mpd.conf:
set bundle authname "<выданный>"
set bundle password "<выданный>"
Редактируем mpd.links:
set pptp self
Редактируем io-up.sh:
ip_def_gw=<Ваш>
Редактируем io-down.sh:
ip_def_gw=<Ваш>

5. Проверяем работоспособность демона
mpd
По умолчанию mpd работает в интерактивном режиме. Если все правильно настроено, то последние строчки появившегося лога будут такими (в примере показано выделение IP VPN 80.92.195.12):
IPADDR 80.92.195.12
[vpn] IPCP: state change Ack-Sent —> Opened
[vpn] IPCP: LayerUp
80.92.195.12 -> 80.92.200.254
[vpn] IFACE: Up event
[vpn] setting interface ng0 MTU to 1500 bytes
[vpn] exec: /sbin/ifconfig ng0 80.92.195.12 80.92.200.254 netmask 0xffffffff -link0
[vpn] exec: /sbin/route add 80.92.195.12 -iface lo0
[vpn] exec: /usr/local/etc/mpd/io-up.sh ng0 inet 80.92.195.12 80.92.200.254
[vpn] IFACE: Up event

После поднятия mpd в таблице маршрутизации должны быть приблизительно такие строки.
default 80.92.200.254 UGSc 1 528 ng0
80.92.195.12 lo0 UHS 0 0 lo0
80.92.200.254 80.92.204.9 UGHS 1 0 fxp0

6. После проверки правильности работы в дальнейшем mpd можно запускать как демон:
/usr/local/sbin/mpd -b
а результаты работы смотреть через лог-файл.

7. Для создания Лог-файла нужно:
- добавить строчки в /etc/syslog.conf:
!mpd
*.* /var/log/mpd.log
- создать файл /var/log/mpd.log
- перепустить syslogd (killall -1 syslogd)
Второй

I knew I wanted pptp (because someone told me that's what I wanted). This was dictated by the fact that the office (i.e. the server) was using pptp. So here is how I found my options:
    [dan@ns1:] $ cd /usr/ports
    [dan@ns1:/usr/ports] $ make search key=pptp
    Port:   poptop-1.1.2
    Path:   /usr/ports/net/poptop
    Info:   Windows 9x compatible PPTP (VPN) server
    Maint:  nsayer@freebsd.org
    Index:  net
    B-deps:
    R-deps:

    Port:   pptpclient-1.0.3
    Path:   /usr/ports/net/pptpclient
    Info:   PPTP client for establishing a VPN link with an NT server
    Maint:  thomas@cuivre.fr.eu.org
    Index:  net
    B-deps: libgnugetopt-1.1
    R-deps: libgnugetopt-1.1

    [dan@ns1:/usr/ports] $


Since I wanted a client and did not need a server, I went with net/pptpclient. Here is the rather complicated installation process:
    cd /usr/ports/net/pptpclient
    make install


You should read the examples which will be installed at /usr/local/share/examples/pptpclient.
If you have configured a PPP client before, this should look familiar. I took the example provided by the port but saved the existing .conf file.

 cd /etc/ppp
    mv ppp.conf ppp.conf.original
    cp usr/local/share/examples/pptpclient/ppp.conf .
    chmod 640 ppp.conf


The chmod ensures that the password contained in the file is not readable by everyone.

If you read the /usr/local/share/examples/pptpclient you will see that you need to change a few things in the .conf file. I changed the items shown in bold.

  $ less ppp.conf
    THEOFFICE:
     set authname myusername
     set authkey mypassword
     set timeout 0
     set ifaddr 0 0
     add 10.5.9.0/24 HISADDR
     alias enable yes


The items in bold are:

* THEOFFICE: This is just a label. Give it a descriptive value. You will use this value on the command line when you invoke pptp.
* myusername: This is the user name assigned to you and which you use to authenticate at the VPN server.
* mypassword: This is the password you use in combination with the user name above.
* 10.5.9.0/24: This is the IP address of the VPN which you will be connecting to. Talk to your VPN administrator to find out what value you should be using. This is the value I will be using later when I get a static route.
Starting the client is easy:

 /usr/local/sbin/pptp a.b.c.d THEOFFICE


where a.b.c.d is the IP address of VPN Server and THEOFFICE is the label you created in the ppp.conf file. When you're done, you can just CONTROL-C it away.
This script appears to do the right thing. There are a few things you should know about this script:

1. It assumes tun0 is the interface you are using for pptp. If you are using more than one PPP connection, you'll probably have to be more careful with this.
2. While running, you'll see two instances of pptp running. This appears to be normal.
3. After stopping, it can take a little while for those two instances of pptp to stop running. This also appears normal.

   $ less /usr/local/etc/rc.d/pptp.sh
    #!/bin/sh

    case "$1" in
    start)
            /usr/local/sbin/pptp a.b.c.d THEOFFICE &
            ;;

    stop)
            if [ -f /var/run/tun0.pid ]
            then
                    kill -TERM `cat /var/run/tun0.pid`
            fi
            ;;

    *)
            echo "Usage: ^Basename $0 {start|stop}" >&2
            ;;
    esac

    exit 0


Make sure to do a chmod +x on the script (all files in /usr/local/etc/rc.d/ must be .sh and +x in order to be run at boot time.
I have two gateways; one is DSL, the other cable. My main connection is DSL and my network machines use the DSL gateway as their default route. I wanted to put the office VPN on my cable connection to spread the load slightly. I achieved this by adding a default route on the DSL gateway which pointed to the cable gateway. Here is how I did that by modifying /etc/rc.conf on the DSL box:

   static_routes="MyOffice"
    route_MyOffice="10.5.9.0/24 192.168.0.20"


This will ensure that all traffic arriving at the DSL gateway for the subnet 10.5.9.0/24 will be redirected to 192.168.0.20 (which is my cable gateway and the box which is running the pptp client).

You can create additional routes by adding more entries to static_routes. For example you can do this:

static_routes="MyOffice FriendsHouse AnotherPlace"


and for each entry you will need to create a route_" entry similar to what you see above for route_MyOffice.
В начало
Профиль : Фотоальбом : Блог : Личное Сообщение
Selax
Сообщение  15 Фев 2008, 14:21  Ссылка : Ответить с цитатой
Пол: Мужской 
C нами с 06.11.2007
Репутация: 32.5

cartman_756 писал(а):
Selax писал(а):
снеговик писал(а):
Selax, как насчёт спросить гугл?
эта и эта ссылки на первой странице поиска.

мб, если я прошу сказать как у меня нет интернета?

Первый
Процедура настройки абонентского компьютера PPTP в FreeBsd c использованием mpd

1. Необходимо, чтобы в ядре была включена поддержка NETGRAPH. Если поддержка NETGRAPH уже включена в ваше ядро, переходите к пункту 3.

2. cd /sys/i386/conf
Вставьте следующие строчки в конфигурацию вашего ядра:
options NETGRAPH
options NETGRAPH_PPTPGRE
options NETGRAPH_MPPC_ENCRYPTION
options NETGRAPH_BPF

config <Название>
cd ../compile/<Название>
make dep
make
make install
Перегрузите операционную систему.

3.Установить пакет mpd из портов. cd /usr/ports/net/mpd
make
make install

4. Распаковать архив mpd.tar в дирректорию /usr/local/etc/mpd
tar -xvvf mpd.tar
cp mpd /usr/local/etc
Редактируем mpd.conf:
set bundle authname "<выданный>"
set bundle password "<выданный>"
Редактируем mpd.links:
set pptp self
Редактируем io-up.sh:
ip_def_gw=<Ваш>
Редактируем io-down.sh:
ip_def_gw=<Ваш>

5. Проверяем работоспособность демона
mpd
По умолчанию mpd работает в интерактивном режиме. Если все правильно настроено, то последние строчки появившегося лога будут такими (в примере показано выделение IP VPN 80.92.195.12):
IPADDR 80.92.195.12
[vpn] IPCP: state change Ack-Sent —> Opened
[vpn] IPCP: LayerUp
80.92.195.12 -> 80.92.200.254
[vpn] IFACE: Up event
[vpn] setting interface ng0 MTU to 1500 bytes
[vpn] exec: /sbin/ifconfig ng0 80.92.195.12 80.92.200.254 netmask 0xffffffff -link0
[vpn] exec: /sbin/route add 80.92.195.12 -iface lo0
[vpn] exec: /usr/local/etc/mpd/io-up.sh ng0 inet 80.92.195.12 80.92.200.254
[vpn] IFACE: Up event

После поднятия mpd в таблице маршрутизации должны быть приблизительно такие строки.
default 80.92.200.254 UGSc 1 528 ng0
80.92.195.12 lo0 UHS 0 0 lo0
80.92.200.254 80.92.204.9 UGHS 1 0 fxp0

6. После проверки правильности работы в дальнейшем mpd можно запускать как демон:
/usr/local/sbin/mpd -b
а результаты работы смотреть через лог-файл.

7. Для создания Лог-файла нужно:
- добавить строчки в /etc/syslog.conf:
!mpd
*.* /var/log/mpd.log
- создать файл /var/log/mpd.log
- перепустить syslogd (killall -1 syslogd)
Второй

I knew I wanted pptp (because someone told me that's what I wanted). This was dictated by the fact that the office (i.e. the server) was using pptp. So here is how I found my options:
    [dan@ns1:] $ cd /usr/ports
    [dan@ns1:/usr/ports] $ make search key=pptp
    Port:   poptop-1.1.2
    Path:   /usr/ports/net/poptop
    Info:   Windows 9x compatible PPTP (VPN) server
    Maint:  nsayer@freebsd.org
    Index:  net
    B-deps:
    R-deps:

    Port:   pptpclient-1.0.3
    Path:   /usr/ports/net/pptpclient
    Info:   PPTP client for establishing a VPN link with an NT server
    Maint:  thomas@cuivre.fr.eu.org
    Index:  net
    B-deps: libgnugetopt-1.1
    R-deps: libgnugetopt-1.1

    [dan@ns1:/usr/ports] $


Since I wanted a client and did not need a server, I went with net/pptpclient. Here is the rather complicated installation process:
    cd /usr/ports/net/pptpclient
    make install


You should read the examples which will be installed at /usr/local/share/examples/pptpclient.
If you have configured a PPP client before, this should look familiar. I took the example provided by the port but saved the existing .conf file.

 cd /etc/ppp
    mv ppp.conf ppp.conf.original
    cp usr/local/share/examples/pptpclient/ppp.conf .
    chmod 640 ppp.conf


The chmod ensures that the password contained in the file is not readable by everyone.

If you read the /usr/local/share/examples/pptpclient you will see that you need to change a few things in the .conf file. I changed the items shown in bold.

  $ less ppp.conf
    THEOFFICE:
     set authname myusername
     set authkey mypassword
     set timeout 0
     set ifaddr 0 0
     add 10.5.9.0/24 HISADDR
     alias enable yes


The items in bold are:

* THEOFFICE: This is just a label. Give it a descriptive value. You will use this value on the command line when you invoke pptp.
* myusername: This is the user name assigned to you and which you use to authenticate at the VPN server.
* mypassword: This is the password you use in combination with the user name above.
* 10.5.9.0/24: This is the IP address of the VPN which you will be connecting to. Talk to your VPN administrator to find out what value you should be using. This is the value I will be using later when I get a static route.
Starting the client is easy:

 /usr/local/sbin/pptp a.b.c.d THEOFFICE


where a.b.c.d is the IP address of VPN Server and THEOFFICE is the label you created in the ppp.conf file. When you're done, you can just CONTROL-C it away.
This script appears to do the right thing. There are a few things you should know about this script:

1. It assumes tun0 is the interface you are using for pptp. If you are using more than one PPP connection, you'll probably have to be more careful with this.
2. While running, you'll see two instances of pptp running. This appears to be normal.
3. After stopping, it can take a little while for those two instances of pptp to stop running. This also appears normal.

   $ less /usr/local/etc/rc.d/pptp.sh
    #!/bin/sh

    case "$1" in
    start)
            /usr/local/sbin/pptp a.b.c.d THEOFFICE &
            ;;

    stop)
            if [ -f /var/run/tun0.pid ]
            then
                    kill -TERM `cat /var/run/tun0.pid`
            fi
            ;;

    *)
            echo "Usage: ^Basename $0 {start|stop}" >&2
            ;;
    esac

    exit 0


Make sure to do a chmod +x on the script (all files in /usr/local/etc/rc.d/ must be .sh and +x in order to be run at boot time.
I have two gateways; one is DSL, the other cable. My main connection is DSL and my network machines use the DSL gateway as their default route. I wanted to put the office VPN on my cable connection to spread the load slightly. I achieved this by adding a default route on the DSL gateway which pointed to the cable gateway. Here is how I did that by modifying /etc/rc.conf on the DSL box:

   static_routes="MyOffice"
    route_MyOffice="10.5.9.0/24 192.168.0.20"


This will ensure that all traffic arriving at the DSL gateway for the subnet 10.5.9.0/24 will be redirected to 192.168.0.20 (which is my cable gateway and the box which is running the pptp client).

You can create additional routes by adding more entries to static_routes. For example you can do this:

static_routes="MyOffice FriendsHouse AnotherPlace"


and for each entry you will need to create a route_" entry similar to what you see above for route_MyOffice.

Спс, хорошо написанл, потом попробую.
В начало
Профиль : Личное Сообщение
Selax
Сообщение  02 Мар 2008, 18:38  Ссылка : Ответить с цитатой
Пол: Мужской 
C нами с 06.11.2007
Репутация: 32.5

имхо, попробовал, неполучается, скажите, как сделать для прогтеха
В начало
Профиль : Личное Сообщение
Byran
Сообщение  02 Мар 2008, 19:28  Ссылка : Ответить с цитатой
Пол: Мужской 
C нами с 14.07.2005
Репутация: 87.6

Помнится видел следующее: http://forum.xnix.ru/
Ссылка локальная. Удачи !
В начало
Профиль : Личное Сообщение : JabberID
Selax
Сообщение  02 Мар 2008, 19:45  Ссылка : Ответить с цитатой
Пол: Мужской 
C нами с 06.11.2007
Репутация: 32.5

а роуты авиела нужно прописывать?

Добавлено спустя 40 секунд:

ИМХО там, только авиел
В начало
Профиль : Личное Сообщение
Byran
Сообщение  02 Мар 2008, 20:14  Ссылка : Ответить с цитатой
Пол: Мужской 
C нами с 14.07.2005
Репутация: 87.6

Selax писал(а):
а роуты авиела нужно прописывать?

Вот чего не знаю того не знаю. Как то не сталкивался, пока Улыбочка. Настройка действительно дана для Авиела. Вам лучше там зарегестрироваться и спросить. Ответ будет достаточно толковый.
Ну, поэкспериментируйте на худой конец. Хуже то не будет, надеюсь.

P.S. Вообще, если мыслить логически, в Прогтехе, наверное, свои роутеры VPN рулят. Препарируйте скрипт маршрутизации для винды Подмигивание
В начало
Профиль : Личное Сообщение : JabberID
Selax
Сообщение  03 Мар 2008, 10:05  Ссылка : Ответить с цитатой
Пол: Мужской 
C нами с 06.11.2007
Репутация: 32.5

Для винды вроде нет скрипта маршрутизации
В начало
Профиль : Личное Сообщение
Byran
Сообщение  03 Мар 2008, 12:06  Ссылка : Ответить с цитатой
Пол: Мужской 
C нами с 14.07.2005
Репутация: 87.6

http://alt.progtech.ru/progtech.php
Верхнии строки выделено: правила маршрутизации. Это он и есть.
Да, насколько я понял, при настройке линукс Вы проблемы с маршрутизацией решили (http://unsorted.ru/viewtopic.php?t=5300&postdays=0&postorder=asc&start=100). В чем вобщем то проблемы? Роутеры то те же Улыбочка
В начало
Профиль : Личное Сообщение : JabberID
Selax
Сообщение  03 Мар 2008, 12:25  Ссылка : Ответить с цитатой
Пол: Мужской 
C нами с 06.11.2007
Репутация: 32.5

это был kubuntu в нем интернет легко настроить
В начало
Профиль : Личное Сообщение
Silicoid
Сообщение  18 Апр 2009, 23:36  Ссылка : Ответить с цитатой
Возраст: 45 Пол: Мужской 
C нами с 28.07.2005
Репутация: 135.1

Проблема очень простая
фря 7.1 не видит массива. пишет, что дисковые накопители не найдены.
драйверов на сайте АМД я не нашел...
как быть ?
никто не подскажет?

_____________________________
Выпрямись и убери руки от лица!
В начало
Профиль : Блог : Личное Сообщение : Сайт : ICQ
DStar17
Сообщение  19 Апр 2009, 10:28  Ссылка : Ответить с цитатой
Пол: Мужской  Доверенный пользователь
C нами с 15.07.2005
Репутация: 133.9

Попробуй под Linux.

_____________________________
С дивана видно всё, ты так и знай!
В начало
Профиль : Фотоальбом : Блог : Личное Сообщение
PaulV
Сообщение  05 Май 2009, 15:21  Ссылка : Ответить с цитатой
Возраст: 37 Пол: Мужской 
C нами с 05.02.2006
Репутация: 91.9

Cистема FreeBSD 6.4 (на 7.1 тож самое)
pf.conf
ext_if="lnc0"
int_if="lnc1"

nat on $ext_if from $int_if:network to any -> ($ext_if)



через pfctl -s nat я настройки ната вижу...но nat не работает Грустно
Уверен что ошибка элементарная, но все же не могу ее найти Грустно(

Заранее спасибо!
В начало
Профиль : Фотоальбом : Блог : Личное Сообщение : Сайт : JabberID : ICQ
снеговик
Сообщение  05 Май 2009, 17:14  Ссылка : Ответить с цитатой
Возраст: 41 Пол: Мужской 
C нами с 08.04.2005
Репутация: 96.4

ip forwarding включен? cat 1 > /proc/куда-то/там
не бейте меня ногами, если в фрибсд такого нет

_____________________________

в следующей жизни мечтаю стать сиденьем на женском велосипеде
В начало
Профиль : Фотоальбом : Блог : Личное Сообщение
Показать сообщения:   
На страницу «  1, 2, 3, 4, 5, 6  »

Unsorted   ~  Software  ~  Linux and Unix  ~  FreeBSD

Ответить на тему

Перейти:  





Powered by phpBB   © Unsorted Team  support@unsorted.me  promo@unsorted.me  Полезные скрипты