еще вопрос, как настроить авто подключение при запуске, когда стартует он сразу поднимает tun0, а дшсп клиент еще не настроил внешний интерфейс em0
лог:
Oct 31 00:55:11 freebsd kernel: Starting Network: lo0 em0 em1.
Oct 31 00:55:11 freebsd kernel: lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
Oct 31 00:55:11 freebsd kernel: options=3<RXCSUM,TXCSUM>
Oct 31 00:55:11 freebsd kernel: inet 127.0.0.1 netmask 0xff000000
Oct 31 00:55:11 freebsd kernel: em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
Oct 31 00:55:11 freebsd kernel: options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
Oct 31 00:55:11 freebsd kernel: ether 08:00:27:27:10:4d
Oct 31 00:55:11 freebsd kernel: media: Ethernet autoselect (1000baseT <full-duplex>)
Oct 31 00:55:11 freebsd kernel: status: active
Oct 31 00:55:11 freebsd kernel: em1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
Oct 31 00:55:11 freebsd kernel: options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
Oct 31 00:55:11 freebsd kernel: ether 08:00:27:d3:80:99
Oct 31 00:55:11 freebsd kernel: inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
Oct 31 00:55:11 freebsd kernel: media: Ethernet autoselect (1000baseT <full-duplex>)
Oct 31 00:55:11 freebsd kernel: status: active
Oct 31 00:55:11 freebsd kernel: Starting PPP profile:
Oct 31 00:55:11 freebsd kernel: vpn
Oct 31 00:55:11 freebsd kernel: Warning: iface add: ioctl(SIOCAIFADDR, 0.0.0.0/0 -> 0.0.0.0): Destination address required
Oct 31 00:55:11 freebsd kernel: Warning: set ifaddr: Failed 4
Oct 31 00:55:11 freebsd kernel: Warning: persist: Invalid command
Oct 31 00:55:11 freebsd kernel: Warning: persist: Failed 1
Oct 31 00:55:11 freebsd kernel: .
Oct 31 00:55:11 freebsd kernel: Additional routing options:
Oct 31 00:55:11 freebsd kernel: IP gateway=YES
Oct 31 00:55:11 freebsd kernel: .
Oct 31 00:55:11 freebsd kernel: Starting devd.
Oct 31 00:55:11 freebsd kernel: Starting dhclient.
Oct 31 00:55:11 freebsd kernel: DHCPREQUEST on em0 to 255.255.255.255 port 67
Oct 31 00:55:11 freebsd kernel:
Oct 31 00:55:11 freebsd kernel: DHCPNAK from 10.62.224.1
Oct 31 00:55:11 freebsd kernel:
Oct 31 00:55:11 freebsd kernel: DHCPDISCOVER on em0 to 255.255.255.255 port 67 interval 8
Oct 31 00:55:11 freebsd kernel:
Oct 31 00:55:11 freebsd kernel: DHCPOFFER from 10.62.224.1
Oct 31 00:55:11 freebsd kernel:
Oct 31 00:55:11 freebsd kernel: DHCPREQUEST on em0 to 255.255.255.255 port 67
Oct 31 00:55:11 freebsd kernel:
Oct 31 00:55:11 freebsd kernel: DHCPACK from 10.62.224.1
Oct 31 00:55:11 freebsd kernel:
Oct 31 00:55:11 freebsd kernel: bound to 10.62.254.184 -- renewal in 900 seconds.
Oct 31 00:55:11 freebsd kernel:
Oct 31 00:55:11 freebsd kernel:
Oct 31 00:55:11 freebsd kernel: Flushed all rules.
ifconfig:
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
ether 08:00:27:27:10:4d
inet 10.62.254.184 netmask 0xffffe000 broadcast 10.62.255.255
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
em1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
ether 08:00:27:d3:80:99
inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
ipfw0: flags=8801<UP,SIMPLEX,MULTICAST> metric 0 mtu 65536
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=3<RXCSUM,TXCSUM>
inet 127.0.0.1 netmask 0xff000000
tun0: flags=8010<POINTOPOINT,MULTICAST> metric 0 mtu 1500
options=80000<LINKSTATE>
Opened by PID 390
в общем, если самому соединение поднимать, оно вроде как поднимается, даже ип пишет какой-то:
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
ether 08:00:27:27:10:4d
inet 10.62.254.184 netmask 0xffffe000 broadcast 10.62.255.255
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
em1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
ether 08:00:27:d3:80:99
inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
ipfw0: flags=8801<UP,SIMPLEX,MULTICAST> metric 0 mtu 65536
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=3<RXCSUM,TXCSUM>
inet 127.0.0.1 netmask 0xff000000
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1500
options=80000<LINKSTATE>
inet 80.255.82.194 --> 10.100.222.33 netmask 0xffffffff
Opened by PID 1159
но, нету пинга до хостов, вообще до всех, даже локальных, провайдера.
лог ppp.log
Oct 31 01:38:23 freebsd ppp[988]: Phase: deflink: Created in closed state
Oct 31 01:38:23 freebsd ppp[988]: Warning: persist: Invalid command
Oct 31 01:38:23 freebsd ppp[988]: Warning: persist: Failed 1
Oct 31 01:38:23 freebsd ppp[988]: Phase: PPP Started (direct mode).
Oct 31 01:38:23 freebsd ppp[988]: Phase: bundle: Establish
Oct 31 01:38:23 freebsd ppp[988]: Phase: deflink: closed -> opening
Oct 31 01:38:23 freebsd ppp[988]: Alert: deflink: Can't create /var/run/pts/0.if: No such file or directory
Oct 31 01:38:23 freebsd ppp[988]: Phase: deflink: Connected!
Oct 31 01:38:23 freebsd ppp[988]: Phase: deflink: opening -> carrier
Oct 31 01:38:24 freebsd ppp[988]: Phase: deflink: /dev/pts/0: CD detected
Oct 31 01:38:24 freebsd ppp[988]: Phase: deflink: carrier -> lcp
Oct 31 01:38:24 freebsd ppp[988]: Phase: bundle: Authenticate
Oct 31 01:38:24 freebsd ppp[988]: Phase: deflink: his = CHAP 0x81, mine = none
Oct 31 01:38:26 freebsd ppp[988]: Phase: Chap Input: CHALLENGE (16 bytes)
Oct 31 01:38:23 freebsd ppp[988]: Phase: Using interface: tun0
Oct 31 01:38:26 freebsd ppp[988]: Phase: Chap Output: RESPONSE (мой_логин)
Oct 31 01:38:26 freebsd ppp[988]: Phase: Chap Input: SUCCESS (S=5300C547FEC302BAC550CB8B73E8495EFAB7FDF9)
Oct 31 01:38:26 freebsd ppp[988]: Phase: deflink: lcp -> open
Oct 31 01:38:26 freebsd ppp[988]: Phase: bundle: Network
Oct 31 01:38:30 freebsd ppp[988]: Warning: 0.0.0.0/0: Change route failed: errno: No such process
Oct 31 01:40:09 freebsd ppp[988]: Phase: Signal 15, terminate.
Oct 31 01:40:09 freebsd ppp[988]: Phase: Signal 15, terminate.
Oct 31 01:40:24 freebsd ppp[988]: Phase: bundle: Terminate
Oct 31 01:40:24 freebsd ppp[988]: Phase: deflink: open -> lcp
Oct 31 01:40:24 freebsd ppp[988]: Warning: 0.0.0.0/0: Change route failed: errno: No such process
Oct 31 01:40:39 freebsd ppp[988]: Phase: deflink: Disconnected!
Oct 31 01:40:39 freebsd ppp[988]: Phase: deflink: Connect time: 136 secs: 453 octets in, 1908796149 octets out
Oct 31 01:40:39 freebsd ppp[988]: Phase: deflink: 13 packets in, 3721418 packets out
Oct 31 01:40:39 freebsd ppp[988]: Phase: total 14035269 bytes/sec, peak 19766302 bytes/sec on Wed Oct 31 01:39:12 2012
Oct 31 01:40:39 freebsd ppp[988]: Alert: deflink: Can't remove /var/run/pts/0.if: No such file or directory
Oct 31 01:40:39 freebsd ppp[988]: Phase: deflink: lcp -> closed
Oct 31 01:40:39 freebsd ppp[988]: Phase: bundle: Dead
Oct 31 01:40:39 freebsd ppp[988]: Phase: PPP Terminated (normal).