Skip to content

Instantly share code, notes, and snippets.

@Tesla2550
Tesla2550 / Mikrotik Split Tunnel
Created January 8, 2025 07:24 — forked from soheilsec/Mikrotik Split Tunnel
Mikrotik Split Tunnel
/system scheduler
add interval=1d name="address lists IR1" on-event=\
    "/tool fetch url=http://www.iwik.org/ipcountry/mikrotik/IR\r\
    \n/import file-name=IR" policy=read,write,test start-time=startup
/tool fetch url=http://www.iwik.org/ipcountry/mikrotik/IR
/import file-name=IR
@Tesla2550
Tesla2550 / IBSng Install
Created December 13, 2024 15:39 — forked from soheilsec/IBSng Install
IBSng Install
yum install httpd php postgresql postgresql-server postgresql-python perl iptables-services tar zip unzip wget nano bzip2 install nano lsof net-tools -y
nano /etc/selinux/config
wget https://managedway.dl.sourceforge.net/project/ibsng/IBSng-A1.24.tar.bz2
tar -xvjf IBSng-A1.24.tar.bz2 -C /usr/local
#!/bin/bash
echo "install routeros on linux ubuntu 20"
wget https://download.mikrotik.com/routeros/6.44.6/chr-6.44.6.img.zip -O chr.img.zip && \
gunzip -c chr.img.zip > chr.img && \
mount -o loop,offset=512 chr.img /mnt && \
ADDRESS=`ip addr show eth0 | grep global | cut -d' ' -f 6 | head -n 1` && \
GATEWAY=`ip route list | grep default | cut -d' ' -f 3` && \
echo "/ip address add address=$ADDRESS interface=[/interface ethernet find where name=ether1]
/ip route add gateway=$GATEWAY
/ip service disable telnet
@Tesla2550
Tesla2550 / openvpn installation Script IBSNG
Created December 11, 2024 15:41 — forked from soheilsec/openvpn installation Script IBSNG
openvpn installation Script IBSNG
#!/bin/bash
#
# Powerd By Mr-Amwer
# This script enables duplicate-cn in server.conf. You can share the same client.ovpn file for multiple users.
# Based on Nyr https://github.com/gayankuruppu/openvpn-install-for-multiple-users
MAINSERVERURL="http://amqq.ir/vpn/"
# checks if ubuntu is 1604
if grep -qs "Ubuntu 16.04" "/etc/os-release"; then
@Tesla2550
Tesla2550 / CISCO PAM IBSng
Created December 4, 2024 09:51 — forked from soheilsec/CISCO PAM IBSng
CISCO PAM IBSng
#!/bin/bash
#cisco PAM
#comment privious installation
sed -e '/exclude=ocserv libev/ s/^#*/#/' -i /etc/yum.conf
IP=$(ip addr | grep 'inet' | grep -v inet6 | grep -vE '127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | head -1)
read -p "IP address: " -e -i $IP IP
if echo "$IP" | grep -qE '^(10\.|172\.1[6789]\.|172\.2[0-9]\.|172\.3[01]\.|192\.168)'; then
echo
echo "Enter Public IPv4 Address"