Portál AbcLinuxu, 4. května 2025 23:08
root@turris:~# tcpdump -i ipsec0 -n icmp or udp tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on ipsec0, link-type RAW (Raw IP), capture size 262144 bytes 21:18:00.694485 IP 10.77.154.193 > 192.168.250.1: ICMP echo request, id 41260, seq 0, length 64 21:18:01.695720 IP 10.77.154.193 > 192.168.250.1: ICMP echo request, id 41260, seq 1, length 64 ^C 2 packets captured 2 packets received by filter 0 packets dropped by kernel root@turris:~# tcpdump -i eth1 -n icmp or udp tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes //provoz, ale nevidim nic co by se vztahovalo k memu pingu //i.e. nic jako UDP-encap: ESP(spi=0xc7fd7ae3,seq=0x70), length 132 root@turris:~# tcpdump -i ipsec0 -n icmp or udp tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on ipsec0, link-type RAW (Raw IP), capture size 262144 bytes 21:18:52.704185 IP 10.77.154.193 > 192.168.250.1: ICMP echo request, id 41260, seq 52, length 64 21:18:53.705168 IP 10.77.154.193 > 192.168.250.1: ICMP echo request, id 41260, seq 53, length 64 21:18:54.706153 IP 10.77.154.193 > 192.168.250.1: ICMP echo request, id 41260, seq 54, length 64 ^C 3 packets captured 3 packets received by filter 0 packets dropped by kernelTakze zatim to vypada, ze se po vstupu na ipsec0 packety nekam ztrati. Hadam tedy budto neco v iptables a nebo jeste nekde je neco spatne, ale nevim, na co koukat. Mate nekdo nejaky napad Na turris:
root@turris:~# ipsec statusall no files found matching '/etc/strongswan.d/*.conf' Status of IKE charon daemon (strongSwan 5.3.5, Linux 4.4.91-e8cacce0ae0bf48eea19d58c2e860359-1, armv7l): uptime: 59 minutes, since Dec 07 20:40:42 2017 worker threads: 6 of 16 idle, 6/0/4/0 working, job queue: 0/0/0/0, scheduled: 5 loaded plugins: charon test-vectors ldap pkcs11 aes des blowfish rc2 sha1 sha2 md4 md5 random nonce x509 revocation constraints pubkey pkcs1 pkcs7 pkcs8 pkcs12 pgp dnskey sshkey pem openssl gcrypt af-alg fips-prf gmp agent xcbc cmac hmac ctr ccm gcm curl mysql sqlite attr kernel-libipsec kernel-netlink resolve socket-default connmark farp stroke smp updown eap-identity eap-md5 eap-mschapv2 eap-radius eap-tls xauth-generic xauth-eap dhcp whitelist led duplicheck addrblock unity Listening IP addresses: 10.77.154.193 192.168.254.2 192.168.252.1 fda0:2209:2f01::1 192.168.253.1 Connections: peer-XXX.xxxree.net-tunnel-1: XXX.xxxree.net,0.0.0.0/0,::/0...yyy.ddns.net,0.0.0.0/0,::/0 IKEv1 peer-XXX.xxxree.net-tunnel-1: local: [XXX.xxxree.net] uses pre-shared key authentication peer-XXX.xxxree.net-tunnel-1: remote: uses pre-shared key authentication peer-XXX.xxxree.net-tunnel-1: child: 192.168.252.0/24 === 192.168.250.0/24 TUNNEL Routed Connections: peer-XXX.xxxree.net-tunnel-1{1}: ROUTED, TUNNEL, reqid 1 peer-XXX.xxxree.net-tunnel-1{1}: 192.168.252.0/24 === 192.168.250.0/24 Security Associations (1 up, 0 connecting): peer-XXX.xxxree.net-tunnel-1[1]: ESTABLISHED 33 minutes ago, 10.77.154.193[XXX.xxxree.net]...y.y.y.y[y.y.y.y] peer-XXX.xxxree.net-tunnel-1[1]: IKEv1 SPIs: 3650f1ed90c3ebbe_i 74679c88fb4978f3_r*, pre-shared key reauthentication in 7 hours peer-XXX.xxxree.net-tunnel-1[1]: IKE proposal: AES_CBC_256/HMAC_SHA1_96/PRF_HMAC_SHA1/MODP_2048 peer-XXX.xxxree.net-tunnel-1{2}: INSTALLED, TUNNEL, reqid 1, ESP in UDP SPIs: e86905ed_i c7fd7ae3_o peer-XXX.xxxree.net-tunnel-1{2}: AES_CBC_256/HMAC_SHA1_96, 9408 bytes_i (112 pkts, 293s ago), 9408 bytes_o (112 pkts, 293s ago), rekeying in 11 minutes peer-XXX.xxxree.net-tunnel-1{2}: 192.168.252.0/24 === 192.168.250.0/24
21:18:52.704185 IP 10.77.154.193 > 192.168.250.1: ICMP echo request, id 41260, seq 52, length 64 21:18:53.705168 IP 10.77.154.193 > 192.168.250.1: ICMP echo request, id 41260, seq 53, length 64Nemelo by to nahodou do tulenu chodit ciste = nepremaskovane na 10.77.154.193? Nemas tam nahodou maskaradu na vsechno co jde ven?
root@turris:~# ping 192.168.250.1 PING 192.168.250.1 (192.168.250.1): 56 data bytes 64 bytes from 192.168.250.1: seq=0 ttl=64 time=109.060 ms 64 bytes from 192.168.250.1: seq=1 ttl=64 time=108.753 ms 64 bytes from 192.168.250.1: seq=2 ttl=64 time=109.128 ms 64 bytes from 192.168.250.1: seq=3 ttl=64 time=108.984 msSuper, diky moc za nakopnuti Este pro uplnost (snad to nekomu pripadne pomuze)
root@turris:~# tcpdump -i ipsec0 -n icmp or udp tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on ipsec0, link-type RAW (Raw IP), capture size 262144 bytes 03:09:03.749067 IP 192.168.252.1 > 192.168.250.1: ICMP echo request, id 35358, seq 24, length 64 03:09:03.855987 IP 192.168.250.1 > 192.168.252.1: ICMP echo reply, id 35358, seq 24, length 64 03:09:04.750038 IP 192.168.252.1 > 192.168.250.1: ICMP echo request, id 35358, seq 25, length 64 03:09:04.858260 IP 192.168.250.1 > 192.168.252.1: ICMP echo reply, id 35358, seq 25, length 64a tohle je vypis z eth1 (moje egress iface)
03:08:39.743681 IP 10.77.154.193.4500 > ext-ip-UBNT.4500: UDP-encap: ESP(spi=0xca7b4555,seq=0x5), length 132 03:08:39.850349 IP ext-ip-UBNT.4500 > 10.77.154.193.4500: UDP-encap: ESP(spi=0xb97a7b4f,seq=0x5), length 132 03:08:40.744794 IP 10.77.154.193.4500 > ext-ip-UBNT.4500: UDP-encap: ESP(spi=0xca7b4555,seq=0x6), length 132 03:08:40.852074 IP ext-ip-UBNT.4500 > 10.77.154.193.4500: UDP-encap: ESP(spi=0xb97a7b4f,seq=0x6), length 132 03:08:41.745913 IP 10.77.154.193.4500 > ext-ip-UBNT.4500: UDP-encap: ESP(spi=0xca7b4555,seq=0x7), length 132kde 10.77.154.193 je egress IP stroje turris (jak jsem rikal, nema verejnou adresu, ale asi nejakou verzi 1:1 NAT nebo neceho takove). Jeste jednou diky!
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.