查看: 236|回复: 0

[Mikrotik Ros] Mikrotik RouterOS EoIP脚本

[复制链接]

124

主题

0

回帖

508

积分

管理员

积分
508
发表于 2026-8-20 21:35:42 | 显示全部楼层 |阅读模式
  1. # Office 1 Configuration

  2. # Create EoIP tunnel interface on Office 1 router
  3. /interface eoip
  4. add name=eoip-local remote-address="INSERT IP 1" tunnel-id=1

  5. # Configure IP addresses for the EoIP tunnel interface
  6. /ip address
  7. add address=192.168.1.1/24 interface=eoip-local

  8. # Create a user for EoIP tunnel authentication
  9. /user group
  10. add name=eoiptunnel
  11. /user
  12. add name="INSERT USERNAME 1" group=eoiptunnel password="INSERT PASSWORD 1"

  13. # Configure firewall rules to allow EoIP traffic
  14. /ip firewall filter
  15. add action=accept chain=input comment="Allow EoIP" dst-port=97 protocol=udp
  16. add action=accept chain=input comment="Allow EoIP" dst-port=50,51 protocol=udp
  17. add action=accept chain=forward comment="Allow EoIP" protocol=eoip

  18. #-------------------------------------------------------------------------------------------------

  19. # Office 2 Configuration

  20. # Create EoIP tunnel interface on Office 2 router
  21. /interface eoip
  22. add name=eoip-remote remote-address="INSERT IP 2" tunnel-id=1

  23. # Configure IP addresses for the EoIP tunnel interface
  24. /ip address
  25. add address=192.168.1.2/24 interface=eoip-remote

  26. # Create a user for EoIP tunnel authentication
  27. /user group
  28. add name=eoiptunnel
  29. /user
  30. add name="INSERT USERNAME 2" group=eoiptunnel password="INSERT PASSWORD 2"

  31. # Configure firewall rules to allow EoIP traffic
  32. /ip firewall filter
  33. add action=accept chain=input comment="Allow EoIP" dst-port=97 protocol=udp
  34. add action=accept chain=input comment="Allow EoIP" dst-port=50,51 protocol=udp
  35. add action=accept chain=forward comment="Allow EoIP" protocol=eoip
复制代码


您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关注公众号

相关侵权、举报、投诉及建议等,请发 E-mail:admin@discuz.vip

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.|蜀ICP备17024538号-6

在本版发帖
关注公众号
QQ客服返回顶部