AgentSkillsCN

netcup-vps-provider

Netcup VPS 与 DNS API 的管理。当您遇到以下场景时,可优先选用此技能: (1) 通过 Netcup DNS API 管理 DNS 记录; (2) 通过服务器控制面板(SCP)配置 VPS; (3) 设置防火墙规则与反向 DNS(PTR); (4) 获取并管理 Netcup API 凭据; (5) 排查 DNS 传播延迟问题; (6) 管理在 Netcup 注册的域名; (7) 将外部域名配置为使用 Netcup DNS。

SKILL.md
--- frontmatter
name: netcup-vps-provider
description: |
  Netcup VPS and DNS API management. Use when:
  (1) Managing DNS records via Netcup DNS API
  (2) Configuring VPS via Server Control Panel (SCP)
  (3) Setting up firewall rules and reverse DNS (PTR)
  (4) Obtaining and managing Netcup API credentials
  (5) Troubleshooting DNS propagation issues
  (6) Managing domains registered at Netcup
  (7) Configuring external domains to use Netcup DNS

Netcup VPS Provider

Netcup is a German hosting provider offering VPS and DNS services. This skill covers DNS API automation and VPS management for ARM G11 servers.

Quick Reference

ResourceURL/Value
DNS API endpointhttps://ccp.netcup.net/run/webservice/servers/endpoint.php?JSON
Customer Control Panelhttps://customercontrolpanel.de
Server Control Panelhttps://servercontrolpanel.de
Nameserversroot-dns.netcup.net, second-dns.netcup.net, third-dns.netcup.net

DNS API Workflow

code
1. Login       → Get session ID
2. Query       → infoDnsZone, infoDnsRecords
3. Update      → updateDnsRecords (replaces ALL records)
4. Logout      → End session

Authentication

typescript
const response = await fetch(NETCUP_API, {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    action: 'login',
    param: {
      customernumber: '12345',
      apikey: 'abc123...',
      apipassword: 'xyz789...'
    }
  })
});
// Returns: { responsedata: { apisessionid: 'session-id' } }

Get Records

typescript
{
  action: 'infoDnsRecords',
  param: {
    customernumber: '12345',
    apikey: 'abc123...',
    apisessionid: 'session-id',
    domainname: 'example.com'
  }
}

Update Records

IMPORTANT: This replaces ALL records in the zone. Always send the complete record set.

typescript
{
  action: 'updateDnsRecords',
  param: {
    customernumber: '12345',
    apikey: 'abc123...',
    apisessionid: 'session-id',
    domainname: 'example.com',
    dnsrecordset: {
      dnsrecords: [
        { hostname: '@', type: 'A', destination: '203.0.113.50' },
        { hostname: 'mail', type: 'A', destination: '203.0.113.50' },
        { hostname: '@', type: 'MX', priority: '10', destination: 'mail.example.com' },
        { hostname: '@', type: 'TXT', destination: 'v=spf1 mx ~all' }
      ]
    }
  }
}

API Limitations

LimitationImpactWorkaround
No per-record TTLAll records share zone TTLAccept limitation
Slow propagation~15 min typicalAdd wait/retry logic
Full zone updatesMust send ALL recordsCache and merge
Session timeout15 min sessionsLogin per batch

Email DNS Records

Standard records for Mox email server:

TypeHostnameValue
AmailVPS_IP
Amta-stsVPS_IP
AautoconfigVPS_IP
MX@mail.domain.com (priority 10)
TXT@v=spf1 mx ~all
TXT_dmarcv=DMARC1; p=quarantine; rua=mailto:...
TXT<selector>._domainkeyv=DKIM1; k=rsa; p=...
TXT_mta-stsv=STSv1; id=1
TXT_smtp._tlsv=TLSRPTv1; rua=mailto:...

External Domains

For domains registered elsewhere (Netim, Gandi, etc.):

  1. Add zone in Netcup CCP: Products → Domain → DNS → Add DNS Zone
  2. At registrar: Change nameservers to:
    • root-dns.netcup.net
    • second-dns.netcup.net
    • third-dns.netcup.net
  3. Wait: 24-48 hours for NS propagation
  4. Manage via API: Works like Netcup-registered domains

VPS Management

Reverse DNS (PTR)

Set in Server Control Panel → Network → IPv4/IPv6 address → Edit PTR

Critical for email: PTR must match mail server hostname (e.g., mail.example.com)

Firewall (Port 25)

New VPS may have port 25 blocked:

  1. SCP → Firewall
  2. Remove "netcup Mail block" policy
  3. Save changes

Reference Files

FileWhen to Read
dns-api.mdAPI endpoints, authentication, record types
vps-management.mdSCP operations, firewall, rDNS, SSH
account-setup.mdGetting API credentials, adding zones
troubleshooting.mdDNS propagation, API errors, email issues

Common Issues

ProblemSolution
"Domain not found"Add zone in CCP first (API can't create zones)
Slow propagationWait 15+ min; verify with dig @8.8.8.8
Auth failureRegenerate API key in CCP → Stammdaten → API
Records disappearAPI replaces ALL records; always send complete set
Port 25 blockedRemove "netcup Mail block" in SCP firewall

Verification Commands

bash
# Check A record
dig A mail.example.com @8.8.8.8 +short

# Check MX
dig MX example.com @8.8.8.8 +short

# Check SPF
dig TXT example.com @8.8.8.8 +short | grep spf

# Check DKIM
dig TXT selector._domainkey.example.com @8.8.8.8 +short

# Check DMARC
dig TXT _dmarc.example.com @8.8.8.8 +short

# Check PTR (reverse DNS)
dig -x YOUR_IP +short

# Check from multiple locations
# Use: https://dnschecker.org/

Official Documentation