This file contains hidden or 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
#!/bin/bash | |
IPv6PrefixFile=$HOME/IPv6Prefix.txt | |
IPv6Prefix=$(cat $IPv6PrefixFile) | |
__rfc5952_expand () { | |
read addr mask < <(IFS=/; echo $1) | |
quads=$(grep -oE "[a-fA-F0-9]{1,4}" <<< ${addr/\/*} | wc -l) | |
grep -qs ":$" <<< $addr && { addr="${addr}0000"; (( quads++ )); } | |
grep -qs "^:" <<< $addr && { addr="0000${addr}"; (( quads++ )); } |
This file contains hidden or 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 home server with dynamic prefix for VPN, Web Server, RDP and Firewall setup guide | |
IPv6 is the new successor to legacy IPv4 which overcomes the shortages of IPv4 addresses since it only contains 4,294,967,296 IP addresses where as the smallest IPv6 block which is a /64 has 18,446,744,073,709,551,616 IPv6 addresses. The world is running out of IPv4 addresses and more and more ISPs are moving towards CGNAT (Carrier Grade Network Address Translation) which means instead of a public IPv4 address a private IPv4 address is assigned to users where services hosted on home does not work. If you are planning on setting up a server or remote access to your home or office using IPv6 then this guide is for you. | |
Preparing your device. | |
Windows | |
Windows uses IPv6 privacy extension where it uses a temporary IPv6 address which changes every couple of hours. To force Windows to use a static address create a new file as disable_temp_ipv6.bat and paste these lines | |
netsh interface ipv6 set global randomizeidentifiers=disabl |
This file contains hidden or 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
#!/bin/bash | |
# Create an empty file first at $HOME/ddns-ipv6-address.txt with a 0 in it. | |
ADDRSTORE=$HOME/ddns-ipv6-address.txt | |
__rfc5952_expand () { | |
read addr mask < <(IFS=/; echo $1) | |
quads=$(grep -oE "[a-fA-F0-9]{1,4}" <<< ${addr/\/*} | wc -l) | |
grep -qs ":$" <<< $addr && { addr="${addr}0000"; (( quads++ )); } | |
grep -qs "^:" <<< $addr && { addr="0000${addr}"; (( quads++ )); } | |
[ $quads -lt 8 ] && addr=${addr/::/:$(for (( i=1; i<=$(( 8 - quads )) ; i++ )); do printf "0000:"; done)} |
This file contains hidden or 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
#!/bin/bash | |
# Create an empty file first at $HOME/ddns-ipv6-address.txt with a 0 in it. | |
SUFFIX="::71c6:b34f:8e2a:54f5" | |
ADDRSTORE=$HOME/ddns-ipv6-address.txt | |
STOREDIPV6=$(cat $ADDRSTORE) | |
__rfc5952_expand () { | |
read addr mask < <(IFS=/; echo $1) | |
quads=$(grep -oE "[a-fA-F0-9]{1,4}" <<< ${addr/\/*} | wc -l) | |
grep -qs ":$" <<< $addr && { addr="${addr}0000"; (( quads++ )); } |
This file contains hidden or 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 | |
$user_info=[ | |
'admin'=>['adminpassword','ynNYKWngfgW8gI0WX72g1tRq0RLpDiNz'], | |
'root'=>['rootpassword','16n2VZKFLI3inP3xS1dfdoY60pCOhFIZ'], | |
'manager'=>['managerpassword','ML7IZ0updvFCKtcdEECBf6qCmnX8u4lB'] | |
]; | |
if (!isset($_COOKIE['token'])) | |
{ | |
$login = true; | |
} |
This file contains hidden or 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
#!/usr/sbin/nft -f | |
flush ruleset | |
# ----- IPv4 ----- | |
table ip filter { | |
chain input { | |
type filter hook input priority 0; | |
# accept traffic originated from us | |
ct state {established, related} accept |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Port Scanner</title> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> | |
<meta name="viewport" content="user-scalable=yes, initial-scale=1, width=device-width" /> | |
<style> | |
body { | |
background: #f4f4f4; | |
width:100%; |
This file contains hidden or 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
#!/bin/sh | |
# CONFIGURABLE PARAMETER: PREFIX | |
# Set the prefix to the name of the rules that need to be updated. (Can update multiple rules with same name) | |
PREFIX=Web-ServerIPv6 | |
PREFIX_LEN=${#PREFIX} | |
# CONFIGURABLE PARAMETER: getIP | |
# Set your method of getting IPv6 address in here | |
# Current method is through ip neighbor with MAC address (Lowercase, :)(getIP=$(ip neighbor | grep "Your MAC Here" | grep -v "STALE" | cut -d" " -f1)) |
This file contains hidden or 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 | |
ini_set('max_execution_time', 0); | |
ini_set('memory_limit', -1); | |
$host = 'google.com'; | |
$ports = array(21, 25, 80, 81, 110, 143, 443, 587, 2525, 3306); | |
foreach ($ports as $port) | |
{ | |
$connection = @fsockopen($host, $port, $errno, $errstr, 2); |