{"id":34890067,"url":"https://github.com/astrixgame/routeros-scripting","last_synced_at":"2026-03-16T15:41:00.154Z","repository":{"id":287595559,"uuid":"965202919","full_name":"astrixgame/routeros-scripting","owner":"astrixgame","description":"Collection of jinja2 interactive templates and RouterOS RSC scripts for config automation","archived":false,"fork":false,"pushed_at":"2025-12-02T17:59:12.000Z","size":835,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-27T13:29:31.156Z","etag":null,"topics":["jinja2","mikrotik","routeros-scripts","rsc","templates"],"latest_commit_sha":null,"homepage":"https://astrixorg.gitbook.io/routeros/","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/astrixgame.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-12T16:33:40.000Z","updated_at":"2025-12-02T17:59:15.000Z","dependencies_parsed_at":"2025-12-03T21:11:31.958Z","dependency_job_id":null,"html_url":"https://github.com/astrixgame/routeros-scripting","commit_stats":null,"previous_names":["astrixgame/mikrotik-scripting","astrixgame/routeros-scripting"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/astrixgame/routeros-scripting","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrixgame%2Frouteros-scripting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrixgame%2Frouteros-scripting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrixgame%2Frouteros-scripting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrixgame%2Frouteros-scripting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/astrixgame","download_url":"https://codeload.github.com/astrixgame/routeros-scripting/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrixgame%2Frouteros-scripting/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29562348,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T21:50:49.831Z","status":"ssl_error","status_checked_at":"2026-02-17T21:46:15.313Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jinja2","mikrotik","routeros-scripts","rsc","templates"],"created_at":"2025-12-26T05:00:35.607Z","updated_at":"2026-03-16T15:41:00.147Z","avatar_url":"https://github.com/astrixgame.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RouterOS scripts and templates\nCollection of Jinja2 interactive templates and RouterOS RSC scripts for configuration automation. \nIncludes modular Bash scripts for user-driven generation of MikroTik configs, \nfocusing on scalability, reusability, and rapid deployment.\n\n\n## 🛠️ Install jinja2\nTo install jinja you'll need python with pip, you can install it using:\n```bash\nsudo apt update\nsudo apt install python3-pip\n```\nAnd then install the jinja using:\n```bash\npip3 install jinja2-cli\n```\n\n\n## 🧑🏻‍💻 Usage\n\n### DHCP Templates\n\n#### DHCP Server (templates/dhcp/server.j2)\nConfigures a DHCP server with IP pool, DNS, and optional NTP settings.\n\nVariables:\n- `pool_name`: Name of the IP pool (default: 'dhcp-pool')\n- `pool_range`: IP range for DHCP clients (default: '192.168.88.100-192.168.88.200')\n- `interface`: Interface to run DHCP server on (default: 'bridge1')\n- `server_name`: DHCP server name (default: 'dhcp1')\n- `network`: Network address (default: '192.168.88.0/24')\n- `gateway`: Gateway IP (default: '192.168.88.1')\n- `dns1`, `dns2`: DNS servers (default: '8.8.8.8', '8.8.4.4')\n- `domain`: Optional domain name\n- `ntp`: Enable NTP configuration (optional)\n- `primary_ntp`, `secondary_ntp`: NTP servers if enabled\n\n#### DHCP Client (templates/dhcp/client.j2)\nSets up DHCP client for WAN interfaces with connection monitoring.\n\nVariables:\n- `interface`: WAN interface name (default: 'ether1')\n- `use_peer_dns`: Use DNS from DHCP server (default: 'yes')\n- `use_peer_ntp`: Use NTP from DHCP server (default: 'yes')\n- `add_default_route`: Add default route (default: 'yes')\n- `hostname`: Router hostname (optional)\n- `monitor_host`: Host to monitor (default: '8.8.8.8')\n- `monitor_interval`: Check interval (default: '30s')\n\n### Failover Templates\n\n#### Dual WAN Failover (templates/failover/dual-wan.j2)\nImplements failover between two WAN connections with optional load balancing.\n\nVariables:\n- `primary_gateway`: Primary WAN gateway IP\n- `secondary_gateway`: Secondary WAN gateway IP\n- `primary_interface`: Primary WAN interface (default: 'ether1')\n- `secondary_interface`: Secondary WAN interface (default: 'ether2')\n- `load_balance`: Enable load balancing (default: false)\n- `monitor_host`: Host to monitor (default: '8.8.8.8')\n- `monitor_interval`: Check interval (default: '30s')\n\n#### WAN with LTE Backup (templates/failover/wan-lte.j2)\nConfigures WAN failover with LTE backup connection.\n\nVariables:\n- `wan_gateway`: Primary WAN gateway IP\n- `use_sim_config`: Configure SIM settings (default: false)\n- `apn`: APN for LTE (if use_sim_config=true)\n- `username`: SIM username (optional)\n- `password`: SIM password (optional)\n- `monitor_host`: Host to monitor (default: '8.8.8.8')\n- `check_interval`: Failover check interval (default: '1m')\n\n### OpenVPN Templates\nLocated in templates/openvpn/:\n- `certificates.j2`: SSL certificate configuration\n- `server.j2`: OpenVPN server setup\n- `profiles.j2`: VPN profiles configuration\n- `secrets.j2`: User authentication settings\n\n### PPPoE Templates\n\n#### CETIN PPPoE (templates/pppoe/cetin.j2)\nConfigures PPPoE client for CETIN ISP with VLAN support.\n\nVariables:\n- `interface`: Physical interface (default: 'ether1')\n- `username`: PPPoE username (default: 'pppoe')\n- `password`: PPPoE password (default: 'pppoe')\n- `dns1`, `dns2`: DNS servers (default: '8.8.8.8', '8.8.4.4')\n\n### Example Usage\n\nTo generate a configuration file from a template:\n```bash\njinja2 template.j2 -D variable=value -D variable2=value2 \u003e output.rsc\n```\n\nMultiple variables can be passed using the -D flag for each variable. The generated .rsc file can then be imported into RouterOS.\n\n\n## 🛠️ Tech Stack\n- [RouterOS scripts](https://help.mikrotik.com/docs/spaces/ROS/pages/47579229/Scripting)\n- [Jinja2](https://jinja.palletsprojects.com/en/stable/)\n- [Bash](https://www.gnu.org/software/bash/)\n\n\n## ❤️ Support  \nA simple star to this project repo is enough to keep me motivated. If you find your self very much excited with this project let me know with a tweet.\n\n\n## ➤ License\nDistributed under the MIT  License. See [LICENSE](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrixgame%2Frouteros-scripting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastrixgame%2Frouteros-scripting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrixgame%2Frouteros-scripting/lists"}