|
| 1 | +# Zone Import/Export Configuration |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +Poweradmin includes zone import/export functionality that allows users to import zones from BIND zone files and export zones as zone files. This is useful for migrating zones between DNS servers or for backup purposes. |
| 6 | + |
| 7 | +## Configuration Options |
| 8 | + |
| 9 | +Zone import/export settings can be configured in the `config/settings.php` file under the `modules` > `zone_import_export` section. |
| 10 | + |
| 11 | +| Setting | Default | Description | |
| 12 | +|---------|---------|-------------| |
| 13 | +| `enabled` | `false` | Enable zone import/export functionality | |
| 14 | +| `auto_ttl_value` | `300` | Default TTL in seconds for records when importing zone files | |
| 15 | +| `max_file_size` | `1048576` | Maximum allowed file upload size in bytes (default: 1 MB) | |
| 16 | + |
| 17 | +## Configuration Example |
| 18 | + |
| 19 | +### PHP Configuration |
| 20 | + |
| 21 | +```php |
| 22 | +return [ |
| 23 | + 'modules' => [ |
| 24 | + 'zone_import_export' => [ |
| 25 | + 'enabled' => true, |
| 26 | + 'auto_ttl_value' => 300, |
| 27 | + 'max_file_size' => 1048576, |
| 28 | + ], |
| 29 | + ], |
| 30 | +]; |
| 31 | +``` |
| 32 | + |
| 33 | +### Docker Environment Variables |
| 34 | + |
| 35 | +```bash |
| 36 | +docker run -d --name poweradmin -p 80:80 \ |
| 37 | + -e PA_MODULE_ZONE_IMPORT_EXPORT_ENABLED=true \ |
| 38 | + -e PA_MODULE_ZONE_IMPORT_EXPORT_AUTO_TTL=300 \ |
| 39 | + -e PA_MODULE_ZONE_IMPORT_EXPORT_MAX_FILE_SIZE=1048576 \ |
| 40 | + poweradmin/poweradmin |
| 41 | +``` |
| 42 | + |
| 43 | +| Variable | Description | Default | |
| 44 | +|----------|-------------|---------| |
| 45 | +| `PA_MODULE_ZONE_IMPORT_EXPORT_ENABLED` | Enable zone import/export module | `false` | |
| 46 | +| `PA_MODULE_ZONE_IMPORT_EXPORT_AUTO_TTL` | Default TTL for imported records (seconds) | `300` | |
| 47 | +| `PA_MODULE_ZONE_IMPORT_EXPORT_MAX_FILE_SIZE` | Max upload file size in bytes | `1048576` | |
| 48 | + |
| 49 | +## Usage |
| 50 | + |
| 51 | +When enabled, zone import/export features are available from: |
| 52 | + |
| 53 | +1. **Zone Export** - Export any zone as a BIND zone file from the zone management page |
| 54 | +2. **Zone Import** - Import zones from BIND zone files via the Tools menu |
| 55 | + |
| 56 | +### Zone Export |
| 57 | + |
| 58 | +1. Navigate to any zone in Poweradmin |
| 59 | +2. Click the **Export** button or icon |
| 60 | +3. Select **Zone File** format |
| 61 | +4. The zone file will be downloaded in BIND format |
| 62 | + |
| 63 | +### Zone Import |
| 64 | + |
| 65 | +1. Navigate to **Tools** > **Zone Import** in the navigation menu |
| 66 | +2. Upload a BIND-format zone file |
| 67 | +3. Review the parsed records |
| 68 | +4. Confirm the import |
| 69 | + |
| 70 | +### Supported Features |
| 71 | + |
| 72 | +- BIND zone file format |
| 73 | +- DNSSEC record types |
| 74 | +- IDN (Internationalized Domain Names) support |
| 75 | +- Record comment synchronization |
| 76 | +- Automatic TTL assignment for records without explicit TTL values |
| 77 | + |
| 78 | +## Security Considerations |
| 79 | + |
| 80 | +- Zone import requires appropriate user permissions |
| 81 | +- File uploads are limited by the `max_file_size` setting |
| 82 | +- Imported records are validated before being added to the database |
0 commit comments