Skip to content

Instantly share code, notes, and snippets.

@soheilsec
soheilsec / Gre6
Created September 28, 2023 07:20
2001:4860:4860::8888
2001:4860:4860::8844
ifconfig sit0 up
ifconfig sit0 inet6 tunnel ::216.66.86.114
ifconfig sit1 up
ifconfig sit1 inet6 add 2001:470:6c:1e::2/64
route -A inet6 add ::/0 dev sit1
Gre6
fc00::1/8
fc00::2/8
2001:4860:4860::8888
2001:4860:4860::8844
#IRAN
ip tunnel add 6to4tun_IR mode sit remote 109.104.154.73 local 185.231.182.127
ip -6 addr add fc00::1/8 dev 6to4tun_IR
@soheilsec
soheilsec / نصب v2ray روی میکروتیک
Created September 15, 2023 21:00
نصب v2ray روی میکروتیک
اولین به این اموزش نیاز هست
https://help.mikrotik.com/docs/display/ROS/Container
فعال کردن کانتینر
/system/device-mode/update container=yes
ریبوت سخت افزاری
ساخت اینترفیس و نت
/interface/veth/add name=veth1 address=172.17.0.2/24 gateway=172.17.0.1
V2ray Tunnels
install v2ray
sudo apt install speedtest-cli
apt-get update -y && apt-get upgrade -y
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
@soheilsec
soheilsec / gist:354967ae5894969474bb070205518213
Created September 11, 2023 11:30
Tunnel Centos to Mikrotik over 6to4
ip tunnel add 6to4tun_IR mode sit remote 109.104.154.58 local 109.104.154.29
ip -6 addr add 2001:470:1f10:e1f::1/64 dev 6to4tun_IR
ip link set 6to4tun_IR mtu 1480
ip link set 6to4tun_IR up
ip -6 tunnel add GRE6Tun_IR mode ip6gre remote 2001:470:1f10:e1f::2 local 2001:470:1f10:e1f::1
ip addr add 172.16.1.2/30 dev GRE6Tun_IR
ip link set GRE6Tun_IR mtu 1436
ip link set GRE6Tun_IR up
ip route add default via 172.16.1.2 table 120
ip rule add from 172.16.24.0/24 table 120
#!/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