сегодня появилась необходимость подцепить freebsd клиентом к тойже цыске и нивкакую. с фри пинги не идут никуда
конфиг цыски
Код: Выделить всё
#sh run
Building configuration...
Current configuration : 6096 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname x
!
boot-start-marker
boot-end-marker
!
!
aaa new-model
!
!
aaa authentication login default local
aaa authentication ppp default local
aaa authorization network default local
!
aaa session-id common
!
resource policy
!
!
!
ip cef
no ip dhcp use vrf connected
ip dhcp excluded-address 192.168.10.190 192.168.10.220
!
ip dhcp pool lan_dhcp
network 192.168.10.0 255.255.255.0
default-router 192.168.10.201
dns-server 8.8.8.8
!
!
ip domain name zavod
ip name-server 8.8.8.8
ip ssh time-out 60
ip ssh authentication-retries 2
ip ssh version 2
vpdn enable
!
vpdn-group VPN
! Default PPTP VPDN group
accept-dialin
protocol pptp
virtual-template 1
!
username x privilege 15 secret 5 x
username diakon password 0 x
username diakon2 password 0 x
!
!
!
!
!
!
!
interface FastEthernet0/0
description LAN
ip address 192.168.10.201 255.255.255.0
no ip unreachables
ip nat inside
ip virtual-reassembly
duplex auto
speed auto
!
interface FastEthernet0/1
description WAN
ip address 62.x.x.226 255.255.255.0
no ip redirects
no ip unreachables
no ip proxy-arp
ip nat outside
ip virtual-reassembly
duplex auto
speed auto
no cdp enable
!
interface Virtual-Template1
ip unnumbered FastEthernet0/1
ip nat inside
ip virtual-reassembly
peer default ip address pool pptptest
no keepalive
ppp mtu adaptive
ppp encrypt mppe auto
ppp authentication pap chap ms-chap ms-chap-v2
!
ip local pool pptptest 192.168.100.30 192.168.100.80
ip route 0.0.0.0 0.0.0.0 62.x.x.1
!
!
no ip http server
no ip http secure-server
ip dns server
ip nat inside source list 15 interface FastEthernet0/1 overload
!
access-list 15 permit 192.168.0.0 0.0.255.255
Код: Выделить всё
pptp_client:
create bundle static B1
set bundle disable compression
set bundle disable encryption
set ccp no mppc
set mppc no compress e40 e56 e128 stateless
# set iface route 192.168.100.0/24
# set iface route 192.168.10.0/24
set iface route default
set ipcp ranges 0.0.0.0/0 0.0.0.0/0
create link static L1 pptp
set link action bundle B1
# set link enable pap chap
set auth authname diakon
set auth password x
set link max-redial 0
set link mtu 1460
set link keep-alive 20 75
set pptp peer 62.x.x.226
set pptp disable windowing
open
Код: Выделить всё
root@nas1:~ # ifconfig
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=82099<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
ether 00:24:1d:74:53:bd
inet 172.17.0.3 netmask 0xffff0000 broadcast 172.17.255.255
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
inet 127.0.0.1 netmask 0xff000000
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
ng0: flags=88d1<UP,POINTOPOINT,RUNNING,NOARP,SIMPLEX,MULTICAST> metric 0 mtu 1460
inet 192.168.100.32 --> 62.x.x.226 netmask 0xffffffff
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
root@nas1:~ #
root@nas1:~ # netstat -rn
Код: Выделить всё
Routing tables
Internet:
Destination Gateway Flags Netif Expire
default 172.17.0.1 UGS re0
62.x.x.226 link#3 UH ng0
127.0.0.1 link#2 UH lo0
172.17.0.0/16 link#1 U re0
172.17.0.3 link#1 UHS lo0
192.168.100.77 link#3 UHS lo0
доп опции ядра
Код: Выделить всё
options IPFIREWALL
options IPFIREWALL_DEFAULT_TO_ACCEPT
#options IPFIREWALL_FORWARD
options IPFIREWALL_VERBOSE
options IPFIREWALL_VERBOSE_LIMIT=50
options IPFIREWALL_NAT
options LIBALIAS
options ROUTETABLES=2
options DUMMYNET
Код: Выделить всё
FreeBSD nas1 10.3-RELEASE FreeBSD 10.3-RELEASE #0: Tue Apr 26 20:24:16 MSK 2016 root@nas1:/usr/obj/usr/src/sys/NAS1 amd64
root@nas1:~ #
кусок лога
Код: Выделить всё
Apr 27 00:40:29 nas1 mpd: [L1] Link: Join bundle "B1"
Apr 27 00:40:29 nas1 mpd: [B1] Bundle: Status update: up 1 link, total bandwidth 64000 bps
Apr 27 00:40:29 nas1 mpd: [B1] IPCP: Open event
Apr 27 00:40:29 nas1 mpd: [B1] IPCP: state change Initial --> Starting
Apr 27 00:40:29 nas1 mpd: [B1] IPCP: LayerStart
Apr 27 00:40:29 nas1 mpd: [B1] IPCP: Up event
Apr 27 00:40:29 nas1 mpd: [B1] IPCP: state change Starting --> Req-Sent
Apr 27 00:40:29 nas1 mpd: [B1] IPCP: SendConfigReq #1
Apr 27 00:40:29 nas1 mpd: [B1] IPADDR 0.0.0.0
Apr 27 00:40:29 nas1 mpd: [B1] COMPPROTO VJCOMP, 16 comp. channels, no comp-cid
Apr 27 00:40:29 nas1 mpd: [B1] IPCP: rec'd Configure Request #1 (Req-Sent)
Apr 27 00:40:29 nas1 mpd: [B1] IPADDR 62.x.x.x
Apr 27 00:40:29 nas1 mpd: [B1] 62.x.x.x is OK
Apr 27 00:40:29 nas1 mpd: [B1] IPCP: SendConfigAck #1
Apr 27 00:40:29 nas1 mpd: [B1] IPADDR 62.x.x.x
Apr 27 00:40:29 nas1 mpd: [B1] IPCP: state change Req-Sent --> Ack-Sent
Apr 27 00:40:29 nas1 mpd: [L1] rec'd unexpected protocol CCP, rejecting
Apr 27 00:40:29 nas1 mpd: [B1] IPCP: rec'd Configure Reject #1 (Ack-Sent)
Apr 27 00:40:29 nas1 mpd: [B1] COMPPROTO VJCOMP, 16 comp. channels, no comp-cid
Apr 27 00:40:29 nas1 mpd: [B1] IPCP: SendConfigReq #2
Apr 27 00:40:29 nas1 mpd: [B1] IPADDR 0.0.0.0
Apr 27 00:40:29 nas1 mpd: [B1] IPCP: rec'd Configure Nak #2 (Ack-Sent)
Apr 27 00:40:29 nas1 mpd: [B1] IPADDR 192.168.100.32
Apr 27 00:40:29 nas1 mpd: [B1] 192.168.100.32 is OK
Apr 27 00:40:29 nas1 mpd: [B1] IPCP: SendConfigReq #3
Apr 27 00:40:29 nas1 mpd: [B1] IPADDR 192.168.100.32
Apr 27 00:40:29 nas1 mpd: [B1] IPCP: rec'd Configure Ack #3 (Ack-Sent)
Apr 27 00:40:29 nas1 mpd: [B1] IPADDR 192.168.100.32
Apr 27 00:40:29 nas1 mpd: [B1] IPCP: state change Ack-Sent --> Opened
Apr 27 00:40:29 nas1 mpd: [B1] IPCP: LayerUp
Apr 27 00:40:29 nas1 mpd: [B1] 192.168.100.32 -> 62.x.x.x
Apr 27 00:40:29 nas1 mpd: [B1] IFACE: Add route 0.0.0.0/0 62.x.x.x failed: File exists
Apr 27 00:40:29 nas1 mpd: [B1] IFACE: Up event