natmap
natmap copied to clipboard
TCP/UDP port mapping for full cone NAT
Natter 在 v2.0 版本中新增了 iptables / nftables 转发功能,通过 `-m` 选项可指定转发的方法。 可以考虑在 NATMap 添加同样的功能。 考虑设计此功能的原因是: - 省去手动设置防火墙端口转发的步骤。虽然不同发行版的防火墙各不相同,但都以 iptables / nftables 作为后端。由 NATMap 设置可一步到位; - BT 类程序打洞需要保持内外部端口号一致,需要 NATMap 动态调整端口转发规则; - 虽然通过通知脚本能达到类似目的,但是在 NATMap...
#!/bin/sh ZONE='' RECORD='' EMAIL='' AUTH='' DOMAIN='' IP4P=${3} while true; do curl -X PUT "https://api.cloudflare.com/client/v4/zones/${ZONE}/dns_records/${RECORD}" \ -H "X-Auth-Email: ${EMAIL}" \ -H "Authorization: Bearer ${AUTH}" \ -H "Content-Type:application/json" \ --data "{\"type\":\"AAAA\",\"name\":\"${DOMAIN}\",\"content\":\"${IP4P}\",\"ttl\":60,\"proxied\":false}" >...
## TCP/UDP | Primary address | Primary port | Alternate port | Notes | |-----------------------------|--------------|----------------|-------| | turn.cloudflare.com | 3478 | 53/udp,80/tcp | | | fwa.lifesizecloud.com | 3478 | | |...
添加docker支持
Dockerfile: ``` FROM ubuntu:latest ENV LANG C.UTF-8 ENV LANGUAGE C.UTF-8 ENV LC_ALL C.UTF-8 RUN apt update \ && apt upgrade -y \ && apt install -y gcc git make curl...
**Log output** ``` [E] ... Cannot assign requested address, Please check is another instance exists or wait a minute. [E] ... Start TCP keep-alive service failed. ``` **Root cause** In...
Now we can use NATMap in host server, and it works well. It will be more awesome if it could be supported with docker. Thanks to developers.
1. It should not use public internet address space `2001::/32`. It's better to use private address space, for example: `fc00::/7`. 2. It should contain some “magic numbers”. For example SLAAC...
iptables implementation for #51 . Example of usage: ```bash sudo natmap -m iptables -s turn.cloudflare.com -h a.co -t 127.0.0.1 -p 80 ``` Check iptables rules: ```bash sudo iptables -t nat...