Because ROS allows you to reset and keep existing users and passwords, couldn't you provide a mode that will not add any users at all? And if the option is chosen, the instructions would be to save the generated configuration and to reset using the "keep-users=yes" option.
Also, instead of having the router download the config and import, if you have access to the router with winbox already, it is easy to downloadng the rsc file to the PC running the config generator and uploading the file to /flash on the target and then using the command command:
But the config generator is still not creating 100% correct configs. The syntax of the the generated firewall forward chain rule for at least the RB760iGS was not correct
And to get it to accept the command, I had to remove " hw-offload=yes"; changing it to " hw-offload=no" was not enough.
Also, the following allow-from syntax was not allowed. I ended up removing the who ip services section to get it to load without error.
Here's the .json file i used.
saved setting .json file
{
"app": "extremehosting-mikrotik-configurator",
"kind": "device",
"_notice": "This file holds passwords, Wi-Fi passphrases and private keys in plain text. Keep it with the customer records, not in e-mail or a shared folder.",
"v": 1,
"device": {
"sku": "RB760iGS"
},
"mode": "wizard",
"profile": "office",
"step": 8,
"enabled": {
"system": true,
"access": true,
"ports": true,
"vlans": true,
"wan": true,
"lan": false,
"dns": true,
"ipv6": true,
"firewall": true,
"wifi": true,
"capsman": false,
"vpn": false,
"routing": false,
"qos": false,
"hotspot": false,
"ha": false,
"services": false,
"containers": false,
"imported": false
},
"extras": [],
"system": {
"identity": "hEX-S",
"admin_password": "demochangeme",
"admin_rename": "",
"timezone": "America/New_York",
"ntp": true,
"ntp_servers": "nl.pool.ntp.org,time.cloudflare.com",
"note": "",
"note_show_at_login": true,
"logging": "default",
"syslog_server": "",
"syslog_port": 514,
"log_firewall": false,
"watchdog": false,
"watchdog_address": "",
"ros_target": "latest",
"update_channel": "stable",
"device_mode_bootstrap": false,
"device_mode_scope": "minimal",
"auto_upgrade": false,
"rb_auto_upgrade": true
},
"access": {
"mgmt_source": "",
"services": [
"winbox",
"ssh"
],
"winbox_port": 8291,
"ssh_port": 22,
"www_port": 80,
"www_ssl_port": 443,
"ssh_strong": true,
"www_ssl_cert": true,
"mac_server": "none",
"mac_winbox": "LAN",
"mac_ping": false,
"discovery": "LAN",
"bandwidth_server": false,
"romon": false,
"romon_secret": "",
"cloud_ddns": false,
"cloud_time": false,
"cloud_bth": false,
"users": [],
"user_ssh_keys": [],
"ssh_no_password": false
},
"ports": {
"bridge_name": "bridge",
"lan_ports": [
"ether2",
"ether3",
"ether4",
"ether5",
"sfp1"
],
"bridge_mac": "auto",
"bridge_mac_manual": "",
"protocol_mode": "rstp",
"igmp_snooping": false,
"dhcp_snooping": false,
"dhcp_trusted": [],
"hw_offload": true,
"mtu": "",
"disable_unused": false,
"disabled_ports": [],
"offbridge": false,
"offbridge_port": "ether5",
"offbridge_address": "192.168.254.1/24",
"offbridge_dhcp": true,
"bonds": [],
"comments": [],
"poe": [],
"ether_mtu": ""
},
"vlans": {
"vlans": [
{
"id": 10,
"name": "vlan10-lan",
"address": "192.168.10.1/24",
"dhcp": true,
"internet": true,
"isolated": false,
"mgmt": true
},
{
"id": 20,
"name": "vlan20-guest",
"address": "192.168.20.1/24",
"dhcp": true,
"internet": true,
"isolated": true,
"mgmt": false
},
{
"id": 30,
"name": "vlan30-iot",
"address": "192.168.30.1/24",
"dhcp": true,
"internet": true,
"isolated": true,
"mgmt": false
}
],
"ports": [
{
"iface": "ether2",
"mode": "access",
"pvid": 10,
"tagged": []
},
{
"iface": "ether3",
"mode": "access",
"pvid": 10,
"tagged": []
},
{
"iface": "ether4",
"mode": "access",
"pvid": 10,
"tagged": []
},
{
"iface": "ether5",
"mode": "access",
"pvid": 10,
"tagged": []
},
{
"iface": "sfp1",
"mode": "trunk",
"pvid": 10,
"tagged": [
10,
20,
30
]
}
],
"lease_time": "1d",
"dns_server": "router",
"dns_custom": "",
"domain": ""
},
"wan": {
"provider": "",
"wans": [
{
"iface": "ether1",
"type": "dhcp",
"lte_apn": "internet",
"lte_auth": "none",
"pppoe_name": "pppoe-out1",
"use_peer_dns": true,
"add_default_route": true,
"check_gateway": "ping",
"distance": 1,
"pppoe_vlan": "",
"mac_clone": "",
"mtu": "",
"comment": ""
}
],
"failover": "distance",
"probe1": "1.1.1.1",
"probe2": "9.9.9.9",
"iptv": false,
"iptv_iface": "",
"mss_clamp": true,
"static_routes": []
},
"lan": {
"lan_iface": "",
"mgmt_mode": "static",
"address": "192.168.88.1/24",
"gateway": "",
"dhcp": true,
"pool": "",
"lease_time": "1d",
"dns_server": "router",
"dns_custom": "",
"domain": "",
"ntp_server": "",
"authoritative": "yes",
"add_arp": false,
"static_leases": [],
"options": [],
"relay": false,
"relay_server": ""
},
"dns": {
"upstream": "quad9",
"custom_servers": "",
"doh": false,
"doh_url": "",
"doh_verify": true,
"allow_remote": true,
"cache_size": 4096,
"redirect": false,
"static": [],
"adblock": false
},
"ipv6": {
"wan_mode": "none",
"off_l2": true,
"wan_iface": "ether1",
"pd_length": "56",
"pd_address": false,
"static_prefix": "",
"static_wan": "",
"static_gw": "",
"lan": true,
"nd_dns": true,
"firewall": true,
"wan_allow": []
},
"firewall": {
"style": "genconf",
"defaults": true,
"input_only": false,
"fasttrack": true,
"nat": "masquerade",
"srcnat_address": "",
"forwards": [],
"hairpin": true,
"wan_allow": [],
"bruteforce": false,
"bogons": false,
"block_dns_wan": true,
"drop_ping_wan": false,
"log_drops": false,
"vlan_isolation": true,
"vlan_policy": "matrix",
"vlan_matrix": [
"10>20",
"10>30"
],
"mgmt_vlan_only": false,
"address_lists": [],
"rules": [],
"conntrack_tcp_established": ""
},
"wifi": {
"mode": "ap",
"country": "netherlands",
"ssids": [
{
"ssid": "MikroTik-7806",
"security": "wpa2wpa3",
"passphrase": "",
"bands": [],
"vlan": "",
"isolation": false,
"hidden": false
}
],
"width_5": "20/40/80mhz",
"width_2": "20mhz",
"freq_5": "",
"freq_2": "",
"tx_power": "",
"mlo": false,
"mlo_bands": [],
"mlo_ssid": "",
"mlo_passphrase": "",
"band_steering": true,
"ft": false,
"pmf": "auto",
"access_list": [],
"access_list_default_reject": false,
"cap_controllers": "",
"cap_discovery": "bridge",
"cap_lock": false,
"cap_certificate": false,
"st_ssid": "",
"st_passphrase": "",
"st_security": "wpa2wpa3",
"st_radio": "",
"st_mode": "station-bridge",
"st_bssid": "",
"st_protocol": "802.11",
"rp_ssid": "",
"rp_passphrase": "",
"rp_security": "wpa2",
"rp_radio": "",
"rp_mode": "station-bridge",
"rp_same_ssid": true,
"rp_out_ssid": "",
"rp_out_passphrase": "",
"rp_rebroadcast_uplink": true
},
"capsman": {
"stack": "wifi",
"country": "netherlands",
"ssids": [
{
"ssid": "Office",
"security": "wpa2wpa3",
"passphrase": "",
"bands": [
"2.4ghz",
"5ghz"
],
"vlan": "",
"isolation": false
}
],
"width_5": "20/40/80mhz",
"width_2": "20mhz",
"ft": true,
"local_forwarding": true,
"identity_regexp": "",
"cap_mgmt_iface": "vlan10-lan",
"controller_cap": true
},
"vpn": {
"public_endpoint": "",
"wireguard": [
{
"name": "wg-rw",
"listen_port": 13231,
"address": "10.10.10.1/24",
"keys": null,
"lan_member": true,
"peers": [
{
"name": "laptop",
"kind": "client",
"allowed": "10.10.10.2/32",
"keys": null,
"public_key": "",
"endpoint": "",
"remote_subnets": "",
"keepalive": 25,
"full_tunnel": true
}
]
}
],
"ike2": false,
"ike2_auth": "cert",
"ike2_fqdn": "",
"ike2_psk": "",
"ike2_pool": "192.168.77.2-192.168.77.254",
"ike2_clients": [
{
"name": "phone1",
"export_pw": ""
}
],
"l2tp": false,
"l2tp_secret": "",
"sstp": false,
"ovpn": false,
"ovpn_port": 1194,
"ovpn_proto": "udp",
"pptp": false,
"ppp_pool": "192.168.89.2-192.168.89.254",
"ppp_local": "192.168.89.1",
"ppp_users": [
{
"name": "vpnuser",
"password": "",
"service": "any"
}
],
"tunnels": [],
"zerotier": ""
},
"routing": {
"addresses": [],
"loopback": "",
"ospf": false,
"ospf_router_id": "",
"ospf_areas": [
{
"name": "backbone",
"area_id": "0.0.0.0",
"type": "default"
}
],
"ospf_ifaces": [],
"ospf_auth_key": "",
"ospf_redistribute": [
"connected"
],
"ospf_default": "never",
"bgp": false,
"bgp_as": "",
"bgp_router_id": "",
"bgp_networks": "",
"bgp_peers": [],
"rip": false,
"rip_ifaces": [],
"tables": [],
"ecmp": ""
},
"qos": {
"mode": "fair",
"down": 500,
"up": 50,
"algo": "cake",
"pcq_rate": 0,
"prio_voip": true,
"prio_gaming": true,
"prio_dns_icmp": true,
"hosts": []
},
"hotspot": {
"hotspot": true,
"hs_iface": "",
"hs_address": "10.5.50.1/24",
"hs_dns_name": "hotspot.local",
"hs_login": [
"http-chap",
"cookie"
],
"hs_trial_time": "30m",
"hs_rate": "5M/20M",
"hs_shared": 1,
"hs_session": "1d",
"hs_idle": "10m",
"hs_users": [
{
"name": "guest",
"password": "guest",
"limit": ""
}
],
"hs_walled": "*.apple.com\ncaptive.apple.com\nconnectivitycheck.gstatic.com\n*.gstatic.com\nwww.msftconnecttest.com",
"hs_https": false,
"pppoe": false,
"pppoe_iface": "",
"pppoe_service": "isp",
"pppoe_local": "10.9.0.1",
"pppoe_pool": "10.9.0.2-10.9.255.254",
"pppoe_dns": "",
"pppoe_users": [],
"radius": false,
"radius_server": "",
"radius_secret": "",
"radius_services": [
"hotspot"
],
"radius_coa": false
},
"ha": {
"vrrp": [],
"vrrp_password": "",
"netwatch": []
},
"services": {
"snmp": "off",
"snmp_community": "monitoring",
"snmp_auth_pw": "",
"snmp_priv_pw": "",
"snmp_from": "",
"snmp_contact": "",
"snmp_location": "",
"netflow": false,
"netflow_target": "",
"netflow_port": 2055,
"netflow_version": "9",
"upnp": false,
"ntp_server": false,
"proxy": false,
"socks": false,
"smb": false,
"graphing": false,
"email": false,
"email_server": "",
"email_port": 587,
"email_tls": "starttls",
"email_user": "",
"email_password": "",
"email_from": "",
"email_to": "",
"backup": false,
"backup_password": "",
"letsencrypt": "",
"scripts": []
},
"containers": {
"disk": "disk1",
"subnet": "172.17.0.1/24",
"registry": "https://registry-1.docker.io",
"containers": [
{
"name": "pihole",
"image": "pihole/pihole:latest",
"ip": "172.17.0.2",
"envs": "TZ=Europe/Amsterdam\nWEBPASSWORD=changeme",
"mounts": "etc-pihole:/etc/pihole",
"ports": ""
}
]
},
"imported": {
"lines": ""
}
}