Очень хочу настроить интернет через DIR-320 прошитый FreeBSD и после этого ipsec через Racoon. В никсах, к сожалению опыта нету вообще


Оборудование:
1. Dir-320 прошитый FreeBSD 8.0
2. Modem 3g Huawei e1550, оператор Megafon
# vi /etc/ppp/ppp.conf (Логин пароль указан beeline - остатки чужого конфига ppp.conf, а мегафон не смотрит на пароль)
Код: Выделить всё
default:
set log Phase Chat LCP IPCP CCP tun command
disable deflate deflate24 protocomp acfcomp shortseq vj
deny deflate deflate24 protocomp acfcomp shortseq vj
megafon:
set speed 115200
set mtu maximum 576
set timeout 0
set redial 10 10
enable dns
set device /dev/ttyU0
set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" AT OK-AT-OK ATE1Q
0 OK ATE0V1 OK AT+CGDCONT=1,\\\"IP\\\",\\\"internet\\\" OK \\dATDT\\T TIMEOUT 40
0 CONNECT"
set phone *99***1\#
set login
set authname beeline
set authkey beeline
set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
Код: Выделить всё
# vi /etc/rc.conf/
update_freebsd_url="http://www.dlink.ua/files/products/ftp/pub/Router/dir320_f
reebsd_last.php"
update_linux_url="http://www.dlink.ua/files/products/ftp/pub/Router/dir320.php
"
#ppp_umodule="umodem"
#ppp_enable="YES"
#ppp_mode="ddial"
#ppp_nat="YES"
#ppp_profile="papchap"
buttons_enable="YES"
buttons_pins="6 7"
buttons_gpioc_dev="/dev/gpioc0"
#ntpdate_enable="YES"
#ntpdate_hosts="213.130.12.2"
#firewall_enable="YES"
firewall_type="OPEN"
cloned_interfaces="vlan2"
gateway_enable="YES"
hostname="freebsd-dir-320.dlink.ua"
ifconfig_bfe0="192.168.25.1/24"
ifconfig_vlan2="DHCP vlan 2 vlandev bfe0"
#defaultrouter="192.168.90.2"
#sshd_enable="YES"
inetd_enable="YES"
inetd_flags="-wW -C 60 -a 192.168.25.1"
#lpd_enable="YES"
racoon_enable="YES"
dumpdev="NO"
sendmail_enable="NONE"
harvest_interrupt="NO"
harvest_ethernet="NO"
harvest_p_to_p="NO"
Код: Выделить всё
# usbconfig dump_device_desc
ugen0.1: <EHCI root HUB Broadcom> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0200
bDeviceClass = 0x0009
bDeviceSubClass = 0x0000
bDeviceProtocol = 0x0001
bMaxPacketSize0 = 0x0040
idVendor = 0x0000
idProduct = 0x0000
bcdDevice = 0x0100
iManufacturer = 0x0001 <Broadcom>
iProduct = 0x0002 <EHCI root HUB>
iSerialNumber = 0x0000 <no string>
bNumConfigurations = 0x0001
ugen1.1: <OHCI root HUB Broadcom> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0100
bDeviceClass = 0x0009
bDeviceSubClass = 0x0000
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0040
idVendor = 0x0000
idProduct = 0x0000
bcdDevice = 0x0100
iManufacturer = 0x0001 <Broadcom>
iProduct = 0x0002 <OHCI root HUB>
iSerialNumber = 0x0000 <no string>
bNumConfigurations = 0x0001
ugen1.2: <HUAWEI Mobile HUAWEI Technology> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0200
bDeviceClass = 0x0000
bDeviceSubClass = 0x0000
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0040
idVendor = 0x12d1
idProduct = 0x1001
bcdDevice = 0x0000
iManufacturer = 0x0002 <HUAWEI Technology>
iProduct = 0x0001 <HUAWEI Mobile>
iSerialNumber = 0x0000 <no string>
bNumConfigurations = 0x0001
Код: Выделить всё
bpf cuaU0.1 devctl led stdout ttyU0.2.lock ugen1.1
bpf0 cuaU0.1.init devstat map ttyU0.0 ttyu0 ugen1.2
cfi0 cuaU0.1.lock fd mem ttyU0.0.init ttyu0.init urandom
cfid0 cuaU0.2 fido null ttyU0.0.lock ttyu0.lock usb
console cuaU0.2.init geom.ctl ptmx ttyU0.1 tun0 usbctl
ctty cuaU0.2.lock gpioc0 pts ttyU0.1.init tun1 zero
cuaU0.0 cuau0 iso9660 random ttyU0.1.lock tun2
cuaU0.0.init cuau0.init klog stderr ttyU0.2 tun3
cuaU0.0.lock cuau0.lock kmem stdin ttyU0.2.init ugen0.1
Код: Выделить всё
# dmesg
uhub1: 2 ports with 2 removable, self powered
map/rootfs.ulzma: 89 x 131072 blocks
uhub0: 2 ports with 2 removable, self powered
g_map_taste: mediasize 11665408 secsize 512 blksize 65536 offmask 0xffffffff
g_map_taste: mediasize 11665408 secsize 512 blksize 65536 offmask 0xffffffff
Root mount waiting for: usbus0
Trying to mount root from cd9660:/dev/map/rootfs.ulzma
warning: no time-of-day clock registered, system time will not be set accurately
start_init: trying /sbin/init
start_init: trying /sbin/oinit
ugen1.2: <HUAWEI Technology> at usbus1
u3g0: <HUAWEI Technology HUAWEI Mobile, class 0/0, rev 2.00/0.00, addr 2> on usbus1
u3g0: Found 3 ports.
vlan2: bpf attached
gpio0: Will report interrupt on pin 0x40
gpio0: Will report interrupt on pin 0x80
CFI write offset=0x00030000
t_delta 15.fdf8e2698496e1b0 too short
t_delta 16.01949fa60225b780 too long
tun0: bpf attached
tun1: bpf attached
CFI write offset=0x00030000
tun2: bpf attached
tun3: bpf attached
Пытаюсь подключить интернет через PPP:
Код: Выделить всё
# ppp megafon
Loading /lib/libalias_ftp.so
Loading /lib/libalias_pptp.so
Working in interactive mode
Using interface: tun4
Warning: Add route failed: 0.0.0.0 already exists
ppp ON freebsd-dir-320>
Пишу подробно, т.к не знаю где копать
