saschpe / libvirt-hook-qemu

Libvirt hook for setting up iptables port-forwarding rules when using NAT-ed networking.
236 stars 69 forks source link

allow specifying a single port, fixes #4 #10

Closed bronson closed 8 years ago

bronson commented 8 years ago

Tested both syntaxes on my server, everything seems to work.

bronson commented 8 years ago

here's an example from my server's config:

        "port_map": {
            "udp": [53],
            "tcp": [53, 25, 587, 993, 80, 443]
        }

vs

        "port_map": {
            "udp": [[53, 53]],
            "tcp": [[53, 53],
                    [25, 25],
                    [587, 587],
                    [993, 993],
                    [80, 80],
                    [443, 443]]
        }
saschpe commented 8 years ago

Nice one