Go to file
2025-12-03 16:01:17 +01:00
.gitignore inital commit 2025-11-22 21:44:43 +01:00
inwx_cli.py refactor: Clean up and enhance cross-platform compatibility 2025-12-03 15:28:22 +01:00
inwx_config.py feat(auth): Implement robust session handling and 2FA unlock flow 2025-12-03 16:01:17 +01:00
inwx_dns_functions.py refactor: Clean up and enhance cross-platform compatibility 2025-12-03 15:28:22 +01:00
README.md README.md aktualisiert 2025-11-22 21:54:20 +01:00

INWX DNS CLI Tool

This is a set of Python scripts designed to manage DNS records hosted with INWX via their JSON-RPC API. It provides a simple command-line interface (CLI) to view, add, modify, and delete DNS records without using the INWX web portal.

Features

  • Login/Logout: Secure session management with the INWX API.
  • View Records: List all DNS records for a specified domain (nameserver.info).
  • Add Records: Create new DNS records (A, CNAME, TXT, etc.) (nameserver.createRecord).
  • Modify Records: Update the content or TTL of existing records (nameserver.updateRecord).
  • Delete Records: Remove existing records using their unique ID (nameserver.deleteRecord).

Prerequisites

You need Python 3 and the requests library installed:

pip install requests

##Project Structure The tool is organized into three files for modularity:

inwx_cli.py The main executable file. Handles user input and the main menu loop. inwx_config.py Manages global constants (API_ENDPOINT, SESSION_ID), and the core login, logout, and api_call functions. inwx_dns_functions.py Contains all specific functions for DNS CRUD operations (view, add, update, delete).

Usage

  1. Execute the Script Run the main CLI file from your terminal:
python3 inwx_cli.py
  1. Authentication The script will prompt you for your INWX username and password.

Security Note: It is highly recommended to create a dedicated sub-account in the INWX portal with permissions limited only to DNS management for API access.

  1. Menu Options Follow the on-screen menu to perform operations:

View: Enter the domain name (e.g., example.com) to see a list of all current records, including their unique ID.

Add/Modify/Delete: Use the record ID obtained from the View function to perform subsequent modification or deletion operations.

Environment Variables (Optional) You can skip the login prompts by exporting your credentials as environment variables:


export INWX_USER="your_username"
export INWX_PASS="your_password"
python3 inwx_cli.py