Quick NAT with GNU/Linux iptables firewall.
First set static IP for LAN adapter:
ip address add 192.168.99.1/24 dev LANeth0
Enable packet forwarding:
echo 1 > /proc/sys/net/ipv4/ip_forward
#!/bin/sh | |
VARIABLES=$(sysrc -NA) | |
for item in $VARIABLES | |
do | |
DESCRIPTION=$(sysrc -d $item | perl -pe 's@^([^:]+): (.*)@$2@') | |
DEFAULT=$(sysrc -Dn $item) | |
if [ -z "$DESCRIPTION" ]; then |
#!/bin/sh | |
# Function for printing | |
p() | |
{ | |
KEY=$1 | |
TYPE=$2 | |
DESCR=$3 | |
# last character is '.' |
#!/bin/sh | |
# Wait this many days since last scrub | |
DAYS=30 | |
LANG=C | |
NOW=$(date -j +%s) | |
POOLS=$(zpool list -H -o name) |
$Shell=$Host.UI.RawUI | |
$size=$Shell.WindowSize | |
$size.width=120 | |
$size.height=35 | |
$Shell.WindowSize=$size | |
# buffer | |
$size = $Shell.BufferSize | |
$size.width=[system.console]::BufferWidth |
#!/bin/env/python | |
# -*- encoding: utf8 -*- | |
# | |
# Move files based on directory match list | |
# | |
# Example: | |
# /sorted directory has following directories: | |
# - foo | |
# - bar | |
# |
takeown /f "$path" | |
icacls "$file" /grant administrators:F |
$items = Get-ItemProperty -Path 'Registry::HKey_Local_Machine\Software\Microsoft\Windows NT\CurrentVersion\ProfileList\*' | |
Foreach ($item in $items) { | |
$objUser = New-Object System.Security.Principal.SecurityIdentifier($item.PSChildName) | |
$objName = $objUser.Translate([System.Security.Principal.NTAccount]) | |
$item.PSChildName = $objName.value | |
} | |
Write-Output $items | Select-Object -Property PSChildName, ProfileImagePath |
# List established IPs and ports with DNS resolved names and program names | |
$nfo = @() | |
ForEach ($c in Get-NetTCPConnection -State Established) { | |
if ($c.LocalAddress -eq $c.RemoteAddress) { | |
# skip same IP's | |
Continue | |
} | |
$prog = (Get-Process -Id $c.OwningProcess) |
Quick NAT with GNU/Linux iptables firewall.
First set static IP for LAN adapter:
ip address add 192.168.99.1/24 dev LANeth0
Enable packet forwarding:
echo 1 > /proc/sys/net/ipv4/ip_forward
Local ISOs:
xe sr-create name-label="iso" type=iso device-config:location=/mnt/zfs/iso device-config:legacy_mode=true content-type=iso