Distribusi IP Publik melalui VPN Mikrotik

Sisi R1
double klik untuk salin
/interface bridge add name=br_DNS add name=br_LAN add name=br_public /interface vlan add interface=br_public name=vlan99 vlan-id=99 /ppp profile add bridge=br_public name=profile-pptp-br /interface bridge port add bridge=br_public interface=vlan99 /interface pptp-server server # PPTP connections are considered unsafe, it is suggested to use a more modern VPN protocol instead set enabled=yes /ip address # ip publik add address=103.11.22.33/24 interface=br_public network=103.11.22.0 # ip lokal add address=192.168.22.1/24 interface=ether-lokal network=192.168.22.0 /ip dns set allow-remote-requests=yes servers=1.1.1.1,8.8.8.8 /ip firewall nat add action=masquerade chain=srcnat /ip route add disabled=no dst-address=0.0.0.0/0 gateway=103.11.22.1 routing-table=main \ suppress-hw-offload=no /ppp secret add name=ppp_public1 profile=profile-pptp-br /system note set show-at-login=no

Sisi R2
double klik untuk salin
/interface bridge add name=br_DNS add name=br_LAN add name=br_public /interface vlan add interface=br_public name=vlan99 vlan-id=99 /ppp profile add bridge=br_public name=profile-pptp-br use-encryption=yes /interface pptp-client add connect-to=103.11.22.33 disabled=no name=pptp-out1 profile=\ profile-pptp-br user=ppp_public1 /ip address add address=192.168.33.1/24 interface=ether1 network=192.168.33.0 add address=192.168.33.1/24 interface=ether2 network=192.168.33.0 add address=103.11.22.34/24 interface=br_public network=103.11.22.0 /ip dhcp-client add disabled=yes interface=ether1 /ip dns set allow-remote-requests=yes servers=1.1.1.1,8.8.8.8 /ip firewall nat add action=masquerade chain=srcnat add action=src-nat chain=srcnat out-interface=br_public to-addresses=\ 103.11.22.34 /ip route add disabled=no dst-address=103.11.22.33/32 gateway=103.11.22.1 \ routing-table=main suppress-hw-offload=no add disabled=no dst-address=0.0.0.0/0 gateway=103.11.22.2 routing-table=main \ suppress-hw-offload=no /system note set show-at-login=no



Type above and press Enter to search.

Code Copied!