Инструменты пользователя

Инструменты сайта


сервис_dialup

Сервис DialUP

DialUp с использованием getty

Настройка ppp

[gate:~] # cat /etc/ppp/ppp.conf
default:
 set log Phase Chat LCP IPCP CCP tun command
 ident user-ppp VERSION (built COMPILATIONDATE)

dialupppp:                                                                                                                    
 set ifaddr 192.168.X+100.1 192.168.X+100.2-192.168.X+100.254
 accept dns                                                                     
 set dns 195.19.32.2                                                            
 enable mschap                                                                  
 enable mschapv2          
 set timeout 0

[gate:~] # cat /etc/ppp/ppp.secret 
user1 pass1

Скрипт запуска ppp

[gate:~] # cat > /usr/sbin/ppp.sh
#!/bin/sh    
/usr/sbin/ppp -direct dialupppp

Настройка getty на распознавание ppp пакетов

[gate:~] # cat /etc/gettytab
...
2|std.9600|9600-baud:\      
        :np:sp#9600:pp=/usr/sbin/ppp.sh:
...

Настройка роутинга и NATа

[gate:~] # sysctl net.inet.ip.forwarding=1
net.inet.ip.forwarding: 0 -> 1

[gate:~] # cat /etc/pf.conf
nat on fxp0 from 192.168.X+100.0/24 to any -> (fxp0)

DialUp с использованием mgetty

[gate:~] # pkg_add /usr/ports/packages/All/mgetty-1.1.31.tbz

[gate:~] # tail -n 1 /etc/ttys
cuaa1   "/usr/local/sbin/mgetty"        unknown on insecure

[gate:~] # cat /usr/local/etc/mgetty+sendfax/login.config
...
/AutoPPP/ -     a_ppp   /usr/sbin/ppp.sh
...

[gate:~] # kill -1 1
[gate:~] # tail -f /var/log/mgetty.cuaa1 
сервис_dialup.txt · Последние изменения: 2013/05/22 13:50 (внешнее изменение)