Skip to content

Instantly share code, notes, and snippets.

View retinio's full-sized avatar

Igor Retinskyi retinio

  • Kiev, Ukraine
View GitHub Profile
@retinio
retinio / Socks5.cs
Created April 30, 2024 06:05 — forked from zHaytam/Socks5.cs
A Socks5 implementation in .NET Core (C# 8)
using System;
using System.Globalization;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
namespace Socks
{
public static class Socks5
@retinio
retinio / iptables.service
Last active November 30, 2020 12:42
A Systemd Service to load iptables rules
[Unit]
Description=IPTables rules
After=network.target
[Service]
Type=oneshot
ExecStart=/usr/local/sbin/iptables.sh start
ExecStop=/usr/local/sbin/iptables.sh stop
ExecReload=/usr/local/sbin/iptables.sh restart
RemainAfterExit=yes
@retinio
retinio / iptables.sh
Last active November 30, 2020 12:43
Basic iptables template for ordinary servers (both IPv4 and IPv6). Thank you https://gist.github.com/bionix/b6ea4ad6bcc8c298b439 and https://gist.github.com/f1r-CTLF/3174f9f8ddc1edb37e03
#!/bin/bash
echo ' (pre) script declarations'
IP6TABLES='/sbin/ip6tables'
IP4TABLES='/sbin/iptables'
SSH_PORT='22'
echo '-------------------------------------'
echo 'site-specific variables (change me)'
echo '-------------------------------------'
echo ' SSH_PORT='$SSH_PORT