Задать вопрос
  • PPTP client на MikroTik?

    @dBat
    Доброго времени
    Помогите с советом, а то я заблудился с настройкой доступа в нет
    исходные данные
    PPTP
    ip: 10.0.10.10
    маска: 255.255.255.0
    основной шлюз: 10.0.10.1
    DNS1: 30.30.30.30
    DNS2: 20.20.20.20

    name: 99.99.99.99
    password: MyPass
    vpn: 10.0.0.1

    Local 192.168.1.1/24
    Чтобы не было проблем, вбиваем старый мас с которым раньше работало

    вот что вбиваем

    /interface ethernet set [find default-name=ether1] name=eth1-wan
    /interface ethernet set [find default-name=ether2] name=eth2-lan
    /interface ethernet set [find default-name=ether3] name=eth3-lan
    /interface ethernet set [find default-name=ether4] name=eth4-lan
    /interface ethernet set [find default-name=ether5] name=eth5-lan
    /interface ethernet set eth1-wan mac-address=00:00:00:00:00:00
    /ip address add address=10.0.10.10/255.255.255.0 interface=eth1-wan
    /ip route add dst-address=0.0.0.0/0 gateway=10.0.10.1 check-gateway=ping distance=1
    /ip dns set servers=30.30.30.30,20.20.20.20
    /interface pptp-client add name=tun1-wan disabled=no connect-to=10.0.0.1 user=99.99.99.99

    password=MyPass add-default-route=yes default-route-distance=1 profile=default
    /interface bridge
    add name=br1-lan
    /interface bridge port
    add bridge=br1-lan interface=eth2-lan hw=yes
    add bridge=br1-lan interface=eth3-lan hw=yes
    add bridge=br1-lan interface=eth4-lan hw=yes
    add bridge=br1-lan interface=eth5-lan hw=yes
    add bridge=br1-lan interface=wlan1
    add bridge=br1-lan interface=wlan2
    /interface wireless security-profiles add name=wpa2-protect mode=dynamic-keys authentication-

    types=wpa-psk,wpa2-psk unicast-ciphers=aes-ccm group-ciphers=aes-ccm wpa-pre-shared-key=WPass

    wpa2-pre-shared-key=WPass

    /interface wireless set wlan1 disabled=no ssid=Mi2 mode=ap-bridge band=2ghz-b/g/n frequency=2412

    bridge-mode=enabled wireless-protocol=802.11 security-profile=wpa2-protect default-authentication=yes

    default-forwarding=yes hide-ssid=no
    /interface wireless nstreme set wlan1 enable-nstreme=no enable-polling=no disable-csma=no

    /ip address add address=192.168.1.1/24 interface=br1-lan
    /ip pool add name=dhcp-pc ranges:192.168.1.2-192.168.1.254
    /ip dhcp-server add name=dhcp-pc interface=br1-lan lease-time=08:00:00 address-pool=dhcp-pc
    /ip dhcp-server network add address=192.168.1.0/24 dns-server=192.168.1.1 gateway=192.168.1.1

    netmask=24
    /ip dns set allow-remote-requests=yes
    /ip firewall filter
    add chain=input protocol=icmp
    add chain=input connection-state=new dst-port=80,8291,22 in-interface=br1-lan protocol=tcp src-

    address=192.168.1.0/24
    add chain=input connection-mark=allow_in connection-state=new dst-port=80 in-interface=tun1-wan

    protocol=tcp
    add chain=input connection-state=new dst-port=53,123 protocol=udp src-address=192.168.1.0/24
    add chain=input connection-state=established,related
    add chain=output connection-state=!invalid
    add chain=forward connection-state=established,new in-interface=br1-lan out-interface=tun1-wan src-

    address=192.168.1.0/24
    add chain=forward connection-state=established,related in-interface=tun1-wan out-interface=br1-lan
    add action=drop chain=input
    add action=drop chain=output
    add action=drop chain=forward
    /ip firewall nat
    add action=masquerade chain=srcnat out-interface=tun1-wan src-address=192.168.1.0/24
    add action=redirect chain=dstnat dst-port=9999 protocol=tcp to-ports=80
    /ip firewall mangle
    add action=mark-connection chain=prerouting dst-port=9999 new-connection-mark=allow_in protocol=tcp

    connection-state=new
    Ответ написан
    Комментировать