Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try add exec plugin ros_addrlist, allows write ip to ros address-list through RESTful API #864

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

qiudaomao
Copy link

RouterOS does not support ipset, hence it's hard to use real ip mode or redir-host mode.

However RouterOS provides RESTFul API to modify address-list.
This proposal try add ability allows mosdns add ip address to router os.

format similar to ipset

# exec: ros_addrlist <host>,<user>,<password>,<address-list-name>,<nettype>,<mask>
exec: ros_addrlist http://192.168.23.1:8080,admin,password,mosdns_gfwlist,inet,32
#example
  - tag: gfw-list
    type: sequence
    args:
      - matches: "!resp_ip $local_ip"
        exec: ros_addrlist https://192.168.23.1:443,admin,password,mosdns_gfwlist,inet,32
      - exec: accept

routeros needs enables ip services www/www-ssl

when success new address lists entry will appear in routerOS.

/ip/firewall/address-list/pr
;;; [mosdns] domain: www.google.com.hk.
1 mosdns_gfwlist 142.250.157.199 2024-12-26 15:50:26

This proposal try add ability allows mosdns add ip address to router os.
exec: ros_addrlist http://192.168.23.1:8080,admin,password,mosdns_gfwlist,inet,32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant