Вот уже пятый день мучаюсь) Помогите!

Тема в разделе "Вопросы начинающих", создана пользователем Вадим, 2 сен 2015.

  1. Вадим

    Вадим Новый участник

    Помогите разобраться с проблемой. Имеется два Микротика, между ними поднят VPN PPTP. Связь установилась отлично. Проблема такая, не пингуется клиентский сегмент. А от клиента в сторону сервера, все отлично. 4 день пошел) Я запутался...
    Я дилетант в этих делах.

    ServerVPN
    /interface bridge
    add arp=proxy-arp name=bridge1
    /interface ethernet
    set [ find default-name=ether1 ] arp=proxy-arp comment=wan name=\
    ether1-gateway
    set [ find default-name=ether3 ] disabled=yes
    set [ find default-name=ether4 ] disabled=yes
    set [ find default-name=ether5 ] disabled=yes
    set [ find default-name=ether6 ] disabled=yes name=\
    ether6-master-local
    set [ find default-name=ether7 ] disabled=yes master-port=\
    ether6-master-local name=ether7-slave-local
    set [ find default-name=ether8 ] disabled=yes master-port=\
    ether6-master-local name=ether8-slave-local
    set [ find default-name=ether9 ] disabled=yes master-port=\
    ether6-master-local name=ether9-slave-local
    set [ find default-name=ether10 ] comment=Lan disabled=yes \
    master-port=ether6-master-local name=ether10-slave-local
    /interface pptp-server
    add name=pptp-Tunel user=tun1
    /ip neighbor discovery
    set ether1-gateway comment=wan
    set ether10-slave-local comment=Lan
    /interface ethernet switch port
    set 5 default-vlan-id=0
    set 6 default-vlan-id=0
    set 7 default-vlan-id=0
    set 8 default-vlan-id=0
    set 9 default-vlan-id=0
    set 11 default-vlan-id=0
    /ip dhcp-server
    add name=server1
    /ip ipsec proposal
    set [ find default=yes ] enc-algorithms=aes-128-cbc
    /ip pool
    add name=dhcp_pool1 ranges=192.168.1.2-192.168.1.254
    /ip dhcp-server
    add address-pool=dhcp_pool1 disabled=no interface=ether2 name=\
    dhcp1
    /interface bridge port
    add interface=ether2
    add interface=ether3
    add interface=ether4
    add interface=ether5
    add interface=ether6-master-local
    add
    /interface pptp-server server
    set enabled=yes
    /ip address
    add address=192.168.1.1/24 comment=Lan interface=ether2 network=\
    192.168.1.0
    add address=9.9.9.9/24 comment=Wan interface=\
    ether1-gateway network=9.9.9.9
    /ip dhcp-server network
    add address=192.168.1.0/24 comment="default configuration" \
    dns-server=192.168.88.1 gateway=192.168.1.1 netmask=24
    add address=192.168.88.0/24 gateway=192.168.88.1
    /ip dns
    set allow-remote-requests=yes servers=89.107.115.1,80.78.115.1
    /ip dns static
    add address=192.168.1.1 name=router
    /ip firewall filter
    add chain=input comment="default configuration" protocol=icmp
    add chain=input comment="default configuration" \
    connection-state=established,related
    add chain=forward comment="default configuration" \
    connection-state=established,related disabled=yes \
    dst-address=192.168.2.0/24 in-interface=pptp-Tunel \
    out-interface=pptp-Tunel src-address=192.168.1.0/24
    add chain=input comment="default configuration" in-interface=\
    ether1-gateway
    add chain=forward disabled=yes dst-port=1723 in-interface=\
    pptp-Tunel protocol=tcp
    add chain=forward disabled=yes out-interface=pptp-Tunel \
    protocol=gre
    add action=drop chain=forward comment="default configuration" \
    connection-state=invalid
    add action=drop chain=forward comment="default configuration" \
    connection-nat-state=!dstnat connection-state=new \
    in-interface=ether1-gateway
    /ip firewall nat
    add action=masquerade chain=srcnat comment=\
    "default configuration" out-interface=ether1-gateway
    add action=masquerade chain=srcnat disabled=yes dst-address=\
    !192.168.1.0/24 out-interface=pptp-Tunel
    /ip route
    add distance=1 gateway=9.9.9.9
    add distance=1 dst-address=192.168.2.0/24 gateway=192.168.5.2 \
    pref-src=192.168.5.1
    add disabled=yes distance=1 dst-address=192.168.2.0/24 gateway=\
    192.168.5.2
    /ppp profile
    add dns-server=8.8.8.8,4.4.4.4 local-address=192.168.1.1 name=\
    "VPN Profile" remote-address=*9
    /ppp secret
    add local-address=192.168.5.1 name=tun1 password=tun1 \
    remote-address=192.168.5.2 service=pptp
    add

    ClientVPN
    /interface bridge
    add arp=proxy-arp name=bridge1
    /interface ethernet
    set [ find default-name=ether1 ] arp=proxy-arp comment=WAN name=\
    ether1-gateway
    set [ find default-name=ether4 ] disabled=yes
    set [ find default-name=ether5 ] disabled=yes
    set [ find default-name=ether6 ] disabled=yes name=\
    ether6-master-local
    set [ find default-name=ether7 ] disabled=yes master-port=\
    ether6-master-local name=ether7-slave-local
    set [ find default-name=ether8 ] disabled=yes master-port=\
    ether6-master-local name=ether8-slave-local
    set [ find default-name=ether9 ] disabled=yes master-port=\
    ether6-master-local name=ether9-slave-local
    set [ find default-name=ether10 ] comment="LAN\
    \n" disabled=yes master-port=ether6-master-local name=\
    ether10-slave-local
    /interface pptp-client
    add connect-to=9.9.9.9 disabled=no keepalive-timeout=\
    disabled name=pptp-Tunel password=tun1 user=tun1
    /ip neighbor discovery
    set ether1-gateway comment=WAN discover=no
    set ether10-slave-local comment="LAN\
    \n"
    /interface ethernet switch port
    set 5 default-vlan-id=0
    set 6 default-vlan-id=0
    set 7 default-vlan-id=0
    set 8 default-vlan-id=0
    set 9 default-vlan-id=0
    set 11 default-vlan-id=0
    /ip ipsec proposal
    set [ find default=yes ] enc-algorithms=aes-128-cbc
    /ip pool
    add name=dhcp ranges=192.168.2.10-192.168.2.254
    add name=dhcp_pool1 ranges=192.168.2.2-192.168.2.254
    /ip dhcp-server
    add address-pool=dhcp_pool1 disabled=no interface=ether2 name=\
    dhcp1
    /interface bridge port
    add interface=ether2
    add interface=ether3
    add interface=ether4
    add interface=ether5
    add interface=ether6-master-local
    /ip address
    add address=192.168.2.1/24 comment=Lan interface=ether2 network=\
    192.168.2.0
    add address=0.0.0.0/24 comment=wan interface=\
    ether1-gateway network=0.0.0.0
    /ip dhcp-client
    add comment="default configuration" dhcp-options=\
    hostname,clientid interface=ether1-gateway
    /ip dhcp-server network
    add address=192.168.2.0/24 comment="default configuration" \
    dns-server=89.107.115.1,80.78.115.1 gateway=192.168.2.1 \
    netmask=24
    /ip dns
    set allow-remote-requests=yes servers=89.107.115.1,80.78.115.1
    /ip dns static
    add address=192.168.2.1 name=router
    /ip firewall filter
    add chain=input comment="default configuration" protocol=icmp
    add chain=input comment="default configuration" \
    connection-state=established,related
    add chain=forward comment="default configuration" disabled=yes \
    dst-address=192.168.1.0/24 in-interface=pptp-Tunel \
    out-interface=pptp-Tunel src-address=192.168.2.0/24
    add chain=forward disabled=yes dst-port=1723 out-interface=\
    pptp-Tunel protocol=tcp
    add chain=forward disabled=yes out-interface=pptp-Tunel \
    protocol=gre
    add chain=forward comment="default configuration" \
    connection-state=established,related
    add action=drop chain=forward comment="default configuration" \
    connection-state=invalid
    add action=drop chain=forward comment="default configuration" \
    connection-nat-state=!dstnat connection-state=new \
    in-interface=ether1-gateway
    /ip firewall nat
    add action=masquerade chain=srcnat comment=\
    "default configuration" out-interface=ether1-gateway
    add action=masquerade chain=srcnat disabled=yes dst-address=\
    !192.168.2.0/24 out-interface=pptp-Tunel
    /ip route
    add distance=1 gateway=0.0.0.0
    add distance=1 dst-address=192.168.1.0/24 gateway=192.168.5.1 \
    pref-src=192.168.5.2
    add disabled=yes distance=1 dst-address=192.168.1.0/24 gateway=\
    192.168.5.1
     
  2. Илья Князев

    Илья Князев Администратор Команда форума

    Последнее редактирование модератором: 6 фев 2019
  3. Вадим

    Вадим Новый участник

    routes="10.1.202.0/24 172.16.1.2 1" необходимо добавлять в пункте Secrets? или IP->Routes?
     
  4. Илья Князев

    Илья Князев Администратор Команда форума

    Со стороны сервера, маршруты на клиента добавляются в поле routes в secret клиента.
    Со стороны клиента, маршруты в направлении сервера пишутся в /ip routes. В качестве гейтвея указывается не адрес, а интерфейс pptp-клиента. Там если в поле gateway стрелку нажать, выпадает список интерфейсов.
     
  5. Вадим

    Вадим Новый участник

    А теперь вообще пинги никуда не идут!
     
  6. Илья Князев

    Илья Князев Администратор Команда форума

    А пингуете винду ?
    Там файрвол блокирует пакеты из других подсетей.
     
  7. Вадим

    Вадим Новый участник

  8. Вадим

    Вадим Новый участник

    у меня даже клиентский ТИК не пингуется
     
  9. Вадим

    Вадим Новый участник

    На обеих сторонах в NAT только маскарад по умолчанию прописан.
     
  10. Вадим

    Вадим Новый участник

  11. Вадим

    Вадим Новый участник

    Помогите пожалуйста!
     
  12. Илья Князев

    Илья Князев Администратор Команда форума

    дайте вывод команд
    /ppp export
    /ip route export
    /ip route print
    из ppp уберите пароли.
     
  13. Вадим

    Вадим Новый участник

    Я снова до сих пор ломаю голову. И десять раз менял все местами. на сегодняшний момент у меня настроена конфигурация которая была в начале темы. Т.е не те что на фото.
    Спасибо за консультаций)))
    /pppsecret addlocal-address=192.168.5.1 name=**** password=**** profile=\ default-encryption remote-address=192.168.5.2 service=pptp

    /iproute adddistance=1 gateway=xxx.xxx.xxx.xxx adddistance=1 dst-address=192.168.2.0/24 gateway=192.168.5.2
     

    Вложения:

    • route.jpg
      Размер файла:
      172,3 КБ
      Просмотров:
      1
  14. Илья Князев

    Илья Князев Администратор Команда форума

    Ну смотрите. Просто кусками конфиг кидаю. Со стороны сервера подсеть 172.30.10.0/24
    Со стороны клиента 172.20.20.0/24
    Внешний адрес сервера 1.1.1.1
    Сервер
    Код:
    /ppp secret
    add local-address=172.16.0.1 name=office2 password="VeryBigPassword" profile=default-encryption remote-address=172.16.0.2 routes=172.20.20.0/24 
    Клиент
    Код:
    /interface pptp-client
    add connect-to=1.1.1.1 disabled=no max-mru=1460 max-mtu=1460 name=Office1 password=VeryBigPassword user=Office2
    
    /ip route
    add distance=1 dst-address=172.30.10.0/24 gateway=Office1 
     
  15. Вадим

    Вадим Новый участник

    Я так понимаю мне необходимо в Secret добавить routes? и в ip->routes ничего не трогать!?
     
  16. Илья Князев

    Илья Князев Администратор Команда форума

    Я вам про это писал.
     
  17. Вадим

    Вадим Новый участник

    и пинги пропали вовсе
    /pppsecret addlocal-address=192.168.5.1 name=**** password=**** profile=\ default-encryption remote-address=192.168.5.2 routes=192.168.5.0/24 \ service=pptp


    /iproute adddistance=1 gateway=xxx.xxx.xxx.xxx


    # DST-ADDRESS PREF-SRC GATEWAY DISTANCE 0 AS 0.0.0.0/0 xx.xx.xx.1 1 ADC xx.xxx.xxx.0/24 xxx.xxx.xxx.xx ether1-gateway 0 2 ADC 192.168.1.0/24 192.168.1.1 ether2-master-l... 0 3 ADS 192.168.5.0/24 192.168.5.2 1 4 ADC 192.168.5.2/32 192.168.5.1 pptp-in1 0


    client
     
  18. Илья Князев

    Илья Князев Администратор Команда форума

    Вы Local и Remote адреса из другой подсети дайте. Например 10.255.255.1 и 10.255.255.2
     
  19. Вадим

    Вадим Новый участник

    Это мне вместо 192.168.5.1 и 5.2 прописать такого вида? 10.255.255.0
     
  20. Вадим

    Вадим Новый участник

    Разобрался! и теперь вновь пришел к тому, что клиентская машина не пингуется.