Stacilo nastavit AdvLinkMTU na 1420 a restartovat radvd, vse okamzite funguje. Provider je primo na ethernetu.
Diky moc za pomoc!
Diky moc za pomoc!
Zde lze prohlédnout všech příspěvky uživatele. Jsou zde vidět pouze příspěvky z oblastí, do kterých máte přístup.
# curl -v https://portal.stavebnisprava.gov.cz/
* Host portal.stavebnisprava.gov.cz:443 was resolved.
* IPv6: 2620:1ec:bdf::45
* IPv4: 13.107.246.45
* Trying [2620:1ec:bdf::45]:443...
* Connected to portal.stavebnisprava.gov.cz (2620:1ec:bdf::45) port 443
* ALPN: curl offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
* CApath: none
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 / secp256r1 / RSASSA-PSS
* ALPN: server accepted h2
* Server certificate:
* subject: CN=portal.stavebnisprava.gov.cz
* start date: Jun 14 00:00:00 2024 GMT
* expire date: Dec 12 23:59:59 2024 GMT
* subjectAltName: host "portal.stavebnisprava.gov.cz" matched cert's "portal.stavebnisprava.gov.cz"
* issuer: C=US; O=DigiCert, Inc.; CN=GeoTrust Global TLS RSA4096 SHA256 2022 CA1
* SSL certificate verify ok.
* Certificate level 0: Public key type RSA (2048/112 Bits/secBits), signed using sha256WithRSAEncryption
* Certificate level 1: Public key type RSA (4096/152 Bits/secBits), signed using sha256WithRSAEncryption
* Certificate level 2: Public key type RSA (2048/112 Bits/secBits), signed using sha1WithRSAEncryption
* using HTTP/2
* [HTTP/2] [1] OPENED stream for https://portal.stavebnisprava.gov.cz/
* [HTTP/2] [1] [:method: GET]
* [HTTP/2] [1] [:scheme: https]
* [HTTP/2] [1] [:authority: portal.stavebnisprava.gov.cz]
* [HTTP/2] [1] [:path: /]
* [HTTP/2] [1] [user-agent: curl/8.6.0]
* [HTTP/2] [1] [accept: */*]
> GET / HTTP/2
> Host: portal.stavebnisprava.gov.cz
> User-Agent: curl/8.6.0
> Accept: */*
>
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
< HTTP/2 200
< date: Tue, 02 Jul 2024 13:30:08 GMT
< content-type: text/html
< content-length: 962
< cache-control: public, must-revalidate, max-age=30
< etag: "27988630"
< last-modified: Sun, 30 Jun 2024 06:11:08 GMT
< strict-transport-security: max-age=10886400; includeSubDomains; preload
< referrer-policy: same-origin
< x-content-type-options: nosniff
< x-xss-protection: 1; mode=block
< x-dns-prefetch-control: off
< x-azure-ref: 20240702T133008Z-17d856f5577k67n26f9ucb323c0000000bvg00000000k52p
< x-cache: CONFIG_NOCACHE
< accept-ranges: bytes
$ curl -v -6 https://portal.stavebnisprava.gov.cz/
* Host portal.stavebnisprava.gov.cz:443 was resolved.
* IPv6: 2620:1ec:bdf::45
* IPv4: (none)
* Trying [2620:1ec:bdf::45]:443...
* Connected to portal.stavebnisprava.gov.cz (2620:1ec:bdf::45) port 443
* ALPN: curl offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
* CApath: none
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* Recv failure: Spojení zrušeno druhou stranou
* OpenSSL SSL_connect: Spojení zrušeno druhou stranou in connection to portal.stavebnisprava.gov.cz:443
* Closing connection
curl: (35) Recv failure: Spojení zrušeno druhou stranou
waclaw (2a03:3b40:xxx:0:xxxx:xxxx:xxxx:xxxx) -> portal.stavebnisprava.gov.cz (2620:1ec:bdf::60) 2024-07-02T14:19:48+0200
Keys: Help Display mode Restart statistics Order of fields quit
Packets Pings
Host Loss% Snt Last Avg Best Wrst StDev
1. 2a03:3b40:xxx::1 0.0% 105 0.2 0.2 0.1 0.3 0.0
2. 2a03:3b40:xxx::1 0.0% 105 4.8 5.5 4.2 31.3 2.9
3. 2a03:3b40:42:1:9::2 0.0% 105 5.3 7.0 4.9 30.2 3.0
4. 2a03:3b40:42:1:9::1 0.0% 104 5.3 6.7 4.2 75.2 7.9
5. vl129.sl527s.r1-8.dc1.4d.prg.masterinter.net 0.0% 104 7.8 7.4 4.5 44.2 5.6
6. vl1692.ss500.r1-8.dc1.4d.prg.masterinter.net 0.0% 104 6.0 6.8 4.5 24.0 3.0
7. 2a01:430:ff:1333:1::2 0.0% 104 4.9 6.4 4.2 87.5 8.2
8. 2a01:430:ff:1380:1::3 0.0% 104 8.8 6.6 4.3 38.3 4.6
9. prag-b4-link.ip.twelve99.net 88.3% 104 5.9 5.6 5.1 6.4 0.4
10. ffm-bb2-v6.ip.twelve99.net 50.5% 104 15.2 13.8 11.2 30.4 3.7
11. (waiting for reply)
12. microsoftirelandoperationslimited-svc077193-ic366587.ip.twelve99-cust.net 0.0% 104 14.7 21.9 14.1 87.8 15.6
13. 2a01:111:0:133::3de 0.0% 104 15.7 15.6 13.7 35.5 2.5
14. 2a01:111:223:11a::5e 0.0% 104 15.4 15.8 13.5 32.2 2.9
15. (waiting for reply)
16. 2a01:111:2056:11a::1 0.0% 104 17.6 16.1 13.9 79.9 6.6
2620:1ec:bdf::60
17. (waiting for reply)
18. 2a01:111:2056:11a::1 0.0% 102 15.0 17.1 13.9 74.7 6.6
19. 2a01:111:2056:11a::1 0.0% 102 14.5 17.5 14.2 70.6 7.2
20. 2a01:111:2056:11a::1 0.0% 102 14.4 17.0 14.2 68.1 6.4
21. 2a01:111:2056:11a::1 0.0% 102 21.8 16.7 14.0 36.4 3.6
22. 2a01:111:2056:11a::1 0.0% 102 15.9 16.6 14.0 61.1 5.2
2620:1ec:bdf::60
23. 2a01:111:2056:11a::1 0.0% 101 14.7 16.9 14.1 79.9 7.6
2620:1ec:bdf::60
24. 2a01:111:2056:11a::1 0.0% 99 14.9 16.5 14.1 46.4 4.1
25. 2a01:111:2056:11a::1 0.0% 98 14.7 16.3 14.1 28.2 2.6
2620:1ec:bdf::60
26. 2a01:111:2056:11a::1 0.0% 96 14.9 17.3 14.0 78.7 8.5
27. 2a01:111:2056:11a::1 0.0% 94 15.7 16.6 14.0 54.2 4.5
2620:1ec:bdf::60
28. 2a01:111:2056:11a::1 0.0% 93 18.0 17.0 14.0 70.9 6.8
2620:1ec:bdf::60
29. 2a01:111:2056:11a::1 0.0% 91 15.2 16.8 14.1 37.3 4.3
30. 2a01:111:2056:11a::1 0.0% 90 21.7 16.1 14.2 26.0 2.4
2620:1ec:bdf::60
Citace od: jjrsk kdy 03. 01. 2024, 18:42:17
Coz ale neznamena, ze to takhle je idealni. Lepsi bys mel, kdyby sis pridal routu na ten cilovej webserver, ze 10.x ma posilat na 192.168.34.2. A kdybys opacnou routu pridal na tu protistranu (tzn pokud je protistrana default GW pro klienty, staci aby byla routa tam = ze ma 192.168.34 posilat na 10.9.0.33, jinak per klient), nemusis tam vymejslet ty naty.
Citace od: jjrsk kdy 03. 01. 2024, 18:42:17Bohuzel tohle neni realny, ten cilovej stroj (radio) nema IPv6 a neumi nastavit zadny routovani.
A jeste lip bys to udelal tak, ze na obou stranach zprovoznis IPv6, a pouzijes uplne normalni verejny IPcka.
Citace od: jjrsk kdy 03. 01. 2024, 18:42:17Vim, ale to radio ma jen nesifrovanej endpoint.
BTW: Port 80 je nesifrovanej vis to?
Citace od: 5nik kdy 03. 01. 2024, 17:11:26
Pokud to s maškarádou do vnitřní sítě funguje a bez ní ne, tak to vypadá na problém s routováním. To RPi je výchozí brána pro koncové zařízení (192.168.34.7)? Pokud není, tak v tom případě koncové zařízení (192.168.34.7) neví kam poslat pakety pro wg síť (10.9.0.0/24). Bude třeba mu to říci routou.
Citace od: jjrsk kdy 03. 01. 2024, 16:47:38
TohleKód [Vybrat]
iptables -t nat -A POSTROUTING -o eth0 -p tcp --dport 80 -d 192.168.34.7 -j MASQUERADE
je uplny nesmysl ....
iptables -t nat -A POSTROUTING -j MASQUERADECitace od: jjrsk kdy 03. 01. 2024, 16:47:38
Tohle pravidlo ma byt na wg0Kód [Vybrat]
iptables -t nat -A POSTROUTING -o wg0 -s 192.168.0.0/16 -j SNAT --to-source 10.9.0.33

iptables -P FORWARD ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -p tcp --dport 80 -d 192.168.34.7 -j MASQUERADE# tcpdump -n -i eth0 port 80
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
09:37:05.126530 IP 10.9.0.2.8053 > 192.168.34.7.80: Flags [S], seq 3420858225, win 64860, options [mss 1380,nop,wscale 8,nop,nop,sackOK], length 0
09:37:05.375540 IP 10.9.0.2.8054 > 192.168.34.7.80: Flags [S], seq 3092928337, win 64860, options [mss 1380,nop,wscale 8,nop,nop,sackOK], length 0
09:37:06.126564 IP 10.9.0.2.8053 > 192.168.34.7.80: Flags [S], seq 3420858225, win 64860, options [mss 1380,nop,wscale 8,nop,nop,sackOK], length 0
09:37:06.389736 IP 10.9.0.2.8054 > 192.168.34.7.80: Flags [S], seq 3092928337, win 64860, options [mss 1380,nop,wscale 8,nop,nop,sackOK], length 0
09:37:08.128171 IP 10.9.0.2.8053 > 192.168.34.7.80: Flags [S], seq 3420858225, win 64860, options [mss 1380,nop,wscale 8,nop,nop,sackOK], length 0
09:37:08.391808 IP 10.9.0.2.8054 > 192.168.34.7.80: Flags [S], seq 3092928337, win 64860, options [mss 1380,nop,wscale 8,nop,nop,sackOK], length 0
09:37:10.881720 IP 192.168.34.2.33208 > 192.168.34.7.80: Flags [S], seq 1900770907, win 64240, options [mss 1460,sackOK,TS val 877797696 ecr 0,nop,wscale 7], length 0
09:37:10.887848 IP 192.168.34.7.80 > 192.168.34.2.33208: Flags [S.], seq 254474778, ack 1900770908, win 31000, options [mss 1460,wscale 0,eol], length 0
09:37:10.887960 IP 192.168.34.2.33208 > 192.168.34.7.80: Flags [.], ack 1, win 502, length 0
09:37:10.888232 IP 192.168.34.2.33208 > 192.168.34.7.80: Flags [P.], seq 1:98, ack 1, win 502, length 97: HTTP: GET /device HTTP/1.1
09:37:10.898141 IP 192.168.34.7.80 > 192.168.34.2.33208: Flags [.], ack 98, win 31000, length 0
09:37:10.904178 IP 192.168.34.7.80 > 192.168.34.2.33208: Flags [P.], seq 1:270, ack 98, win 31000, length 269: HTTP: HTTP/1.0 200 OK
09:37:10.904293 IP 192.168.34.2.33208 > 192.168.34.7.80: Flags [.], ack 270, win 501, length 0
09:37:10.905230 IP 192.168.34.2.33208 > 192.168.34.7.80: Flags [F.], seq 98, ack 270, win 501, length 0
09:37:10.912154 IP 192.168.34.7.80 > 192.168.34.2.33208: Flags [.], ack 99, win 31000, length 0
09:37:10.915722 IP 192.168.34.7.80 > 192.168.34.2.33208: Flags [FP.], seq 270, ack 99, win 1, length 0
09:37:10.915847 IP 192.168.34.2.33208 > 192.168.34.7.80: Flags [.], ack 271, win 501, length 0
09:37:12.143091 IP 10.9.0.2.8053 > 192.168.34.7.80: Flags [S], seq 3420858225, win 64860, options [mss 1380,nop,wscale 8,nop,nop,sackOK], length 0
09:37:12.393042 IP 10.9.0.2.8054 > 192.168.34.7.80: Flags [S], seq 3092928337, win 64860, options [mss 1380,nop,wscale 8,nop,nop,sackOK], length 0
09:37:13.703118 IP 192.168.34.2.44088 > 192.168.34.7.80: Flags [S], seq 1191321109, win 64240, options [mss 1460,sackOK,TS val 877800517 ecr 0,nop,wscale 7], length 0
09:37:13.709180 IP 192.168.34.7.80 > 192.168.34.2.44088: Flags [S.], seq 272676370, ack 1191321110, win 31000, options [mss 1460,wscale 0,eol], length 0
09:37:13.709324 IP 192.168.34.2.44088 > 192.168.34.7.80: Flags [.], ack 1, win 502, length 0
09:37:13.709500 IP 192.168.34.2.44088 > 192.168.34.7.80: Flags [P.], seq 1:98, ack 1, win 502, length 97: HTTP: GET /device HTTP/1.1
09:37:13.719013 IP 192.168.34.7.80 > 192.168.34.2.44088: Flags [.], ack 98, win 31000, length 0
09:37:13.725286 IP 192.168.34.7.80 > 192.168.34.2.44088: Flags [P.], seq 1:270, ack 98, win 31000, length 269: HTTP: HTTP/1.0 200 OK
09:37:13.725391 IP 192.168.34.2.44088 > 192.168.34.7.80: Flags [.], ack 270, win 501, length 0
09:37:13.726136 IP 192.168.34.2.44088 > 192.168.34.7.80: Flags [F.], seq 98, ack 270, win 501, length 0
09:37:13.733182 IP 192.168.34.7.80 > 192.168.34.2.44088: Flags [.], ack 99, win 31000, length 0
09:37:13.739337 IP 192.168.34.7.80 > 192.168.34.2.44088: Flags [FP.], seq 270, ack 99, win 1, length 0
09:37:13.739438 IP 192.168.34.2.44088 > 192.168.34.7.80: Flags [.], ack 271, win 501, length 0
09:37:20.156984 IP 10.9.0.2.8053 > 192.168.34.7.80: Flags [S], seq 3420858225, win 64860, options [mss 1380,nop,wscale 8,nop,nop,sackOK], length 0
09:37:20.401814 IP 10.9.0.2.8054 > 192.168.34.7.80: Flags [S], seq 3092928337, win 64860, options [mss 1380,nop,wscale 8,nop,nop,sackOK], length 0
# tcpdump -n -i wg0 port not 22
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on wg0, link-type RAW (Raw IP), snapshot length 262144 bytes
09:16:48.015476 IP 10.9.0.1.46968 > 10.9.0.33.8007: Flags [S], seq 1552326368, win 33120, options [mss 1380,sackOK,TS val 3656499737 ecr 0,nop,wscale 9], length 0
09:16:49.052739 IP 10.9.0.1.46968 > 10.9.0.33.8007: Flags [S], seq 1552326368, win 33120, options [mss 1380,sackOK,TS val 3656500775 ecr 0,nop,wscale 9], length 0
09:16:50.076939 IP 10.9.0.1.46968 > 10.9.0.33.8007: Flags [S], seq 1552326368, win 33120, options [mss 1380,sackOK,TS val 3656501799 ecr 0,nop,wscale 9], length 0
09:16:51.100906 IP 10.9.0.1.46968 > 10.9.0.33.8007: Flags [S], seq 1552326368, win 33120, options [mss 1380,sackOK,TS val 3656502823 ecr 0,nop,wscale 9], length 0
09:16:52.124965 IP 10.9.0.1.46968 > 10.9.0.33.8007: Flags [S], seq 1552326368, win 33120, options [mss 1380,sackOK,TS val 3656503847 ecr 0,nop,wscale 9], length 0
09:16:53.148508 IP 10.9.0.1.46968 > 10.9.0.33.8007: Flags [S], seq 1552326368, win 33120, options [mss 1380,sackOK,TS val 3656504871 ecr 0,nop,wscale 9], length 0
09:16:55.197662 IP 10.9.0.1.46968 > 10.9.0.33.8007: Flags [S], seq 1552326368, win 33120, options [mss 1380,sackOK,TS val 3656506920 ecr 0,nop,wscale 9], length 0
09:16:59.232050 IP 10.9.0.1.46968 > 10.9.0.33.8007: Flags [S], seq 1552326368, win 33120, options [mss 1380,sackOK,TS val 3656510951 ecr 0,nop,wscale 9], length 0
09:17:07.293972 IP 10.9.0.1.46968 > 10.9.0.33.8007: Flags [S], seq 1552326368, win 33120, options [mss 1380,sackOK,TS val 3656519016 ecr 0,nop,wscale 9], length 0
09:17:23.676975 IP 10.9.0.1.46968 > 10.9.0.33.8007: Flags [S], seq 1552326368, win 33120, options [mss 1380,sackOK,TS val 3656535399 ecr 0,nop,wscale 9], length 0
# iptables -v -L
Chain INPUT (policy ACCEPT 18207 packets, 19M bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy DROP 22 packets, 1224 bytes)
pkts bytes target prot opt in out source destination
715 370K DOCKER-USER all -- any any anywhere anywhere
715 370K DOCKER-ISOLATION-STAGE-1 all -- any any anywhere anywhere
342 263K ACCEPT all -- any docker0 anywhere anywhere ctstate RELATED,ESTABLISHED
5 260 DOCKER all -- any docker0 anywhere anywhere
346 106K ACCEPT all -- docker0 !docker0 anywhere anywhere
0 0 ACCEPT all -- docker0 docker0 anywhere anywhere
Chain OUTPUT (policy ACCEPT 13987 packets, 1706K bytes)
pkts bytes target prot opt in out source destination
Chain DOCKER (1 references)
pkts bytes target prot opt in out source destination
5 260 ACCEPT tcp -- !docker0 docker0 anywhere 172.17.0.2 tcp dpt:8036
Chain DOCKER-ISOLATION-STAGE-1 (1 references)
pkts bytes target prot opt in out source destination
346 106K DOCKER-ISOLATION-STAGE-2 all -- docker0 !docker0 anywhere anywhere
715 370K RETURN all -- any any anywhere anywhere
Chain DOCKER-ISOLATION-STAGE-2 (1 references)
pkts bytes target prot opt in out source destination
0 0 DROP all -- any docker0 anywhere anywhere
346 106K RETURN all -- any any anywhere anywhere
Chain DOCKER-USER (1 references)
pkts bytes target prot opt in out source destination
715 370K RETURN all -- any any anywhere anywhere
# iptables -v -t nat -L
Chain PREROUTING (policy ACCEPT 33 packets, 10833 bytes)
pkts bytes target prot opt in out source destination
110 22768 DOCKER all -- any any anywhere anywhere ADDRTYPE match dst-type LOCAL
22 1224 DNAT tcp -- wg0 any anywhere anywhere tcp dpt:8007 to:192.168.34.7:80
Chain INPUT (policy ACCEPT 31 packets, 10443 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 142 packets, 26198 bytes)
pkts bytes target prot opt in out source destination
129 43730 DOCKER all -- any any anywhere !127.0.0.0/8 ADDRTYPE match dst-type LOCAL
Chain POSTROUTING (policy ACCEPT 132 packets, 21388 bytes)
pkts bytes target prot opt in out source destination
67 22088 MASQUERADE all -- any !docker0 172.17.0.0/16 anywhere
0 0 MASQUERADE tcp -- any any 172.17.0.2 172.17.0.2 tcp dpt:8036
Chain DOCKER (2 references)
pkts bytes target prot opt in out source destination
0 0 RETURN all -- docker0 any anywhere anywhere
5 260 DNAT tcp -- !docker0 any anywhere anywhere tcp dpt:8036 to:172.17.0.2:8036
Citace od: jjrsk kdy 02. 01. 2024, 09:06:59
A ses si jistej, ze ten nmap posila data na ten spravnej stroj?
iptables -t nat -A PREROUTING -i wg0 -p tcp --dport 8007 -j DNAT --to-destination 192.168.34.7:80# nmap 10.9.0.33 -p 8007
Starting Nmap 7.93 ( https://nmap.org ) at 2024-01-02 07:35 CET
Nmap scan report for 10.9.0.33
Host is up (0.0084s latency).
PORT STATE SERVICE
8007/tcp filtered ajp12