Skip to content

通过-b指定端口肯定不能成功打洞 #140

Description

@jlw004d

安装natter的电脑已经关闭防火墙,设置为dmz主机,不指定端口肯定可以打洞,通过-b指定端口肯定不能成功,求解

python3 natter.py
2025-05-07 17:38:58 [I] Natter v2.1.1
2025-05-07 17:38:58 [I] Tips: Use --help to see help messages
2025-05-07 17:39:02 [I]
2025-05-07 17:39:02 [I] tcp://192.168.1.20:37665 <--Natter--> tcp://117.181.245.187:63754
2025-05-07 17:39:02 [I]
2025-05-07 17:39:02 [I] Test mode in on.
2025-05-07 17:39:02 [I] Please check [ http://117.181.245.187:63754 ]
2025-05-07 17:39:02 [I]
2025-05-07 17:39:02 [I] LAN > 192.168.1.20:37665 [ OPEN ]
2025-05-07 17:39:02 [I] LAN > 192.168.1.20:37665 [ OPEN ]
2025-05-07 17:39:02 [I] LAN > 117.181.245.187:63754 [ OPEN ]
2025-05-07 17:39:03 [I] WAN > 117.181.245.187:63754 [ OPEN ]
2025-05-07 17:39:03 [I]

python3 natter.py -b 42333 -v
2025-05-07 17:40:32 [I] Natter v2.1.1
2025-05-07 17:40:32 [D] stun: Got address tcp://117.181.245.187:63776 from tcp://fwa.lifesizecloud.com:3478, source tcp://192.168.1.20:42333
2025-05-07 17:40:32 [D] keep-alive: Connected to host tcp://www.baidu.com:80
2025-05-07 17:40:35 [D] keep-alive: OK
2025-05-07 17:40:35 [D] stun: Got address tcp://117.181.245.187:63776 from tcp://fwa.lifesizecloud.com:3478, source tcp://192.168.1.20:42333
2025-05-07 17:40:35 [I]
2025-05-07 17:40:35 [I] tcp://192.168.1.20:42333 <--Natter--> tcp://117.181.245.187:63776
2025-05-07 17:40:35 [I]
2025-05-07 17:40:35 [I] LAN > 192.168.1.20:42333 [ CLOSED ]
2025-05-07 17:40:35 [I] LAN > 192.168.1.20:42333 [ CLOSED ]
2025-05-07 17:40:36 [I] LAN > 117.181.245.187:63776 [ CLOSED ]
2025-05-07 17:40:39 [D] port-test: ifconfig.co: b'HTTP/1.1 200 OK\r\nDate: Wed, 07 May 2025 17:40:39 GMT\r\nContent-Type: application/json\r\nContent-Length: 68\r\nConnection: close\r\ncf-cache-status: DYNAMIC\r\nReport-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=bb8ON1H0sFKeZobuxHowuEYt2KuxM6JSXzs9jRnSC9NqApIbZ4ubwP5Ur8JFB7kAAQmqHD1qwVjVne8L9VnADNb5c8NIJb%2FzdJJVLjJPwovZI%2FuRT76g5t%2B9eqkUTg%3D%3D"}],"group":"cf-nel","max_age":604800}\r\nNEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}\r\nServer: cloudflare\r\nCF-RAY: 93c280e3ae0bcba4-LAX\r\nalt-svc: h3=":443"; ma=86400\r\nserver-timing: cfL4;desc="?proto=TCP&rtt=174352&min_rtt=174352&rtt_var=87176&sent=1&recv=3&lost=0&retrans=0&sent_bytes=0&recv_bytes=112&delivery_rate=0&cwnd=247&unsent_bytes=0&cid=0000000000000000&ts=0&x=0"\r\n\r\n{\n "ip": "117.181.245.187",\n "port": 63776,\n "reachable": false\n}'
2025-05-07 17:40:44 [D] port-test: portcheck.transmissionbt.com: b'HTTP/1.1 200 OK\r\nServer: nginx/1.18.0 (Ubuntu)\r\nDate: Wed, 07 May 2025 17:40:44 GMT\r\nContent-Type: text/html; charset=ISO-8859-1\r\nConnection: close\r\n\r\n0'
2025-05-07 17:40:44 [I] WAN > 117.181.245.187:63776 [ CLOSED ]
2025-05-07 17:40:44 [W] !! Target port is closed !!
2025-05-07 17:40:44 [I]
2025-05-07 17:40:47 [D] keep-alive: OK
2025-05-07 17:41:02 [D] keep-alive: OK
2025-05-07 17:41:17 [D] keep-alive: OK
2025-05-07 17:41:32 [D] keep-alive: OK

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions