Last active
April 21, 2025 22:16
-
-
Save egeneralov/a53142332e35d96ad7b9be21ae5a5024 to your computer and use it in GitHub Desktop.
linux to mikrotik ip tunnel
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
ip tunnel add ipip local ${linux_ip} remote ${mikrotik_ip} mode ipip | |
ip link set ipip up | |
ip addr add 192.168.3.1/30 dev ipip | |
iptables -t mangle -A POSTROUTING -o ipip -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu | |
iptables -t nat -A POSTROUTING -s 192.168.3.0/30 -o ${linux_output_iface} -j MASQUERADE |
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
/interface ipip add !keepalive local-address=${mikrotik_ip} name=tunnel remote-address=${linux_ip} | |
/ip address add address=192.168.3.2/30 interface=tunnel network=192.168.3.0 | |
/interface list member add interface=tunnel list=WAN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this allow a mikrotik use this vps ?