This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/interface l2tp-client add name="vpn" max-mtu=1460 max-mru=1460 mrru=disabled connect-to=servername user="username" password="password" profile=default-encryption add-default-route=no dial-on-demand=no allow=pap,chap,mschap1,mschap2 | |
/interface l2tp-client enable [/interface l2tp-client find name ="vpn"] | |
/ip firewall mangle add chain=prerouting action=mark-routing new-routing-mark=vpn passthrough=yes src-address=networkaddress/24 dst-address=!networkaddress/24 | |
/ip route add dst-address=0.0.0.0/0 gateway=vpn gateway-status=vpn distance=1 scope=30 target-scope=10 routing-mark=vpn | |
/ip firewall nat add chain=srcnat action=masquerade out-interface=vpn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 ;;; 7/0 goes to WAN1 | |
chain=prerouting action=mark-connection new-connection-mark=WAN1_conn passthrough=yes | |
dst-address-type=!local in-interface=LAN1 connection-mark=no-mark | |
per-connection-classifier=both-addresses-and-ports:7/0 | |
19 ;;; 7/1 goes to WAN2 | |
chain=prerouting action=mark-connection new-connection-mark=WAN2_conn passthrough=yes | |
dst-address-type=!local in-interface=LAN1 connection-mark=no-mark | |
per-connection-classifier=both-addresses-and-ports:7/1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 ;;; WAN1 address list -> WAN1 | |
chain=prerouting action=mark-routing new-routing-mark=to_WAN1 passthrough=no | |
dst-address=!192.168.0.0/16 dst-address-list=WAN1 | |
10 ;;; WAN2 address list -> WAN2 | |
chain=prerouting action=mark-routing new-routing-mark=to_WAN2 passthrough=no | |
dst-address=!192.168.0.0/16 dst-address-list=WAN2 | |
11 ;;; WAN3 address list -> WAN3 | |
chain=prerouting action=mark-routing new-routing-mark=to_WAN3 passthrough=no |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Local server settings | |
// Local Database | |
define('DB_NAME', 'client'); | |
define('DB_USER', 'root'); | |
define('DB_PASSWORD', 'root'); | |
define('DB_HOST', 'localhost'); | |
// Overwrites the database to save keep edeting the DB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<extensions> | |
<add assembly="LogglyTarget"/> | |
</extensions> | |
<targets> | |
<target name="Loggly" xsi:type="Loggly" URL="<EnterYourLogglyURLHere>" bufferNumber="5" shouldBuffer="true"/> | |
</targets> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GIT_REPO=$HOME/repositories/<sitename>.git | |
TMP_GIT_CLONE=$HOME/tmp/<sitename> | |
PUBLIC_WWW=/var/wwwsites/<sitename>/ | |
git clone $GIT_REPO $TMP_GIT_CLONE | |
cd $TMP_GIT_CLONE && jekyll --no-auto $TMP_GIT_CLONE $PUBLIC_WWW | |
cd ~ && rm -rf $TMP_GIT_CLONE | |
rsync -avz -e ssh $PUBLIC_WWW <NFSNUSERNAME>@ssh.phx.nearlyfreespeech.net:/home/public/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/ipv6 firewall filter | |
add action=accept chain=input comment="Allow established connections" connection-state=established disabled=no | |
add action=accept chain=input comment="Allow related connections" connection-state=related disabled=no | |
add action=accept chain=input comment="Allow limited ICMP" disabled=no limit=50/5s,5 protocol=icmpv6 | |
add action=accept chain=input comment="Allow UDP" disabled=no protocol=udp | |
add action=drop chain=input comment="" disabled=no | |
add action=accept chain=forward comment="Allow any to internet" disabled=no out-interface=sit1 | |
add action=accept chain=forward comment="Allow established connections" connection-state=established disabled=no | |
add action=accept chain=forward comment="Allow related connections" connection-state=related disabled=no | |
add action=drop chain=forward comment="" disabled=no |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using (FileStream fs = new FileStream(location, FileMode.Open)) | |
{ | |
using (GZipStream gz = new GZipStream(fs, CompressionMode.Decompress)) | |
{ | |
var result = Serializer.Deserialize<objectType>(gz); | |
//work with result here... | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using (MemoryStream serialized = new MemoryStream()) | |
{ | |
Serializer.Serialize(serialized, obj); | |
byte[] data = serialized.ToArray(); | |
using (FileStream fs = new FileStream(tmpFile, FileMode.Create)) | |
{ | |
using (GZipStream zip = new GZipStream(fs, CompressionMode.Compress)) | |
{ | |
zip.Write(data, 0, data.Length); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate -configure -access -off |