Skip to content

Server-client handshake fails #562

@neliavaal

Description

@neliavaal

server:
./udp2raw_amd64 -s -lserver_public_IP:61111 -r server_public_IP:514 -k "passwd_S123" --raw-mode faketcp -a

client
./udp2raw_arm -c -l192.168.1.1:5555 -rserver_public_IP:61111 -k "passwd_S123" --raw-mode faketcp -a

server:

./udp2raw_amd64 -s -lserver_public_IP:61111 -r server_public_IP:514 -k "passwd_S123" --raw-mode faketcp -a
[2025-10-14 19:47:22][INFO]argc=10 ./udp2raw_amd64 -s -lserver_public_IP:61111 -r server_public_IP:514 -k passwd_S123 --raw-mode faketcp -a 
[2025-10-14 19:47:22][INFO]parsing address: server_public_IP:61111
[2025-10-14 19:47:22][INFO]its an ipv4 adress
[2025-10-14 19:47:22][INFO]ip_address is {server_public_IP}, port is {61111}
[2025-10-14 19:47:22][INFO]parsing address: server_public_IP:514
[2025-10-14 19:47:22][INFO]its an ipv4 adress
[2025-10-14 19:47:22][INFO]ip_address is {server_public_IP}, port is {514}
[2025-10-14 19:47:22][INFO]important variables: log_level=4:INFO raw_mode=faketcp cipher_mode=aes128cbc auth_mode=md5 key=passwd_S123 local_addr=server_public_IP:61111 remote_addr=server_public_IP:514 socket_buf_size=1048576 
[2025-10-14 19:47:22][WARN]you can run udp2raw with non-root account for better security. check README.md in repo for more info.
[2025-10-14 19:47:22][INFO]remote_ip=[server_public_IP], make sure this is a vaild IP address
[2025-10-14 19:47:22][INFO]const_id:117fecd0
[2025-10-14 19:47:22][INFO]run_command iptables -N udp2rawDwrW_117fecd0_C0
[2025-10-14 19:47:22][INFO]run_command iptables -F udp2rawDwrW_117fecd0_C0
[2025-10-14 19:47:22][INFO]run_command iptables -I udp2rawDwrW_117fecd0_C0 -j DROP
[2025-10-14 19:47:22][INFO]run_command iptables -I INPUT -d server_public_IP -p tcp -m tcp --dport 61111 -j udp2rawDwrW_117fecd0_C0
[2025-10-14 19:47:22][WARN]auto added iptables rules
[2025-10-14 19:47:22][INFO]now listening at server_public_IP:61111
[2025-10-14 19:47:23][INFO][my_public_IP:14534]received syn,sent syn ack back
[2025-10-14 19:47:23][INFO][my_public_IP:14534]got packet from a new ip
[2025-10-14 19:47:23][INFO][my_public_IP:14534]created new conn,state: server_handshake1,my_id is 4f4e0e10
[2025-10-14 19:47:23][INFO][my_public_IP:14534]changed state to server_handshake1,my_id is 4f4e0e10
[2025-10-14 19:47:25][INFO][my_public_IP:14534]changed state to server_handshake1,my_id is 4f4e0e10
[2025-10-14 19:47:26][INFO][my_public_IP:14534]changed state to server_handshake1,my_id is 4f4e0e10
[2025-10-14 19:47:27][INFO][my_public_IP:14534]changed state to server_handshake1,my_id is 4f4e0e10
[2025-10-14 19:47:28][INFO][my_public_IP:14534]changed state to server_handshake1,my_id is 4f4e0e10
[2025-10-14 19:47:29][INFO][my_public_IP:32246]received syn,sent syn ack back
[2025-10-14 19:47:29][INFO][my_public_IP:32246]got packet from a new ip
[2025-10-14 19:47:29][INFO][my_public_IP:32246]created new conn,state: server_handshake1,my_id is 5b038ab4
[2025-10-14 19:47:29][INFO][my_public_IP:32246]changed state to server_handshake1,my_id is 5b038ab4
[2025-10-14 19:47:30][INFO][my_public_IP:32246]changed state to server_handshake1,my_id is 5b038ab4
[2025-10-14 19:47:31][INFO][my_public_IP:32246]changed state to server_handshake1,my_id is 5b038ab4
[2025-10-14 19:47:33][INFO][my_public_IP:32246]changed state to server_handshake1,my_id is 5b038ab4
[2025-10-14 19:47:34][INFO][my_public_IP:32246]changed state to server_handshake1,my_id is 5b038ab4
[2025-10-14 19:47:35][INFO][my_public_IP:63433]received syn,sent syn ack back
[2025-10-14 19:47:35][INFO][my_public_IP:63433]got packet from a new ip
[2025-10-14 19:47:35][INFO][my_public_IP:63433]created new conn,state: server_handshake1,my_id is ba500ea5
[2025-10-14 19:47:35][INFO][my_public_IP:63433]changed state to server_handshake1,my_id is ba500ea5
[2025-10-14 19:47:36][INFO][my_public_IP:14534]inactive conn cleared 
[2025-10-14 19:47:36][INFO][my_public_IP:63433]changed state to server_handshake1,my_id is ba500ea5
[2025-10-14 19:47:37][INFO][my_public_IP:63433]changed state to server_handshake1,my_id is ba500ea5
[2025-10-14 19:47:38][INFO][my_public_IP:63433]changed state to server_handshake1,my_id is ba500ea5
[2025-10-14 19:47:39][INFO][my_public_IP:63433]changed state to server_handshake1,my_id is ba500ea5
[2025-10-14 19:47:40][INFO][my_public_IP:12471]received syn,sent syn ack back
[2025-10-14 19:47:40][INFO][my_public_IP:12471]got packet from a new ip
[2025-10-14 19:47:40][INFO][my_public_IP:12471]created new conn,state: server_handshake1,my_id is ba971c29
[2025-10-14 19:47:40][INFO][my_public_IP:12471]changed state to server_handshake1,my_id is ba971c29
[2025-10-14 19:47:40][INFO][my_public_IP:32246]inactive conn cleared 
[2025-10-14 19:47:41][INFO][my_public_IP:12471]changed state to server_handshake1,my_id is ba971c29
^C[2025-10-14 19:47:42][INFO]epoll interrupted by signal,continue

[2025-10-14 19:47:42][INFO]run_command iptables -D INPUT -d server_public_IP -p tcp -m tcp --dport 61111 -j udp2rawDwrW_117fecd0_C0
[2025-10-14 19:47:42][INFO]run_command iptables -F udp2rawDwrW_117fecd0_C0
[2025-10-14 19:47:42][INFO]run_command iptables -X udp2rawDwrW_117fecd0_C0

client:

./udp2raw_arm -c -l192.168.1.1:5555  -rserver_public_IP:61111 
 -k "passwd_S123" --raw-mode faketcp -a
[2025-10-14 19:48:37][INFO]argc=9 ./udp2raw_arm -c -l192.168.1.1:5555 -rserver_public_IP:61111 -k passwd_S123 --raw-mode faketcp -a 
[2025-10-14 19:48:37][INFO]parsing address: 192.168.1.1:5555
[2025-10-14 19:48:37][INFO]its an ipv4 adress
[2025-10-14 19:48:37][INFO]ip_address is {192.168.1.1}, port is {5555}
[2025-10-14 19:48:37][INFO]parsing address: server_public_IP:61111
[2025-10-14 19:48:37][INFO]its an ipv4 adress
[2025-10-14 19:48:37][INFO]ip_address is {server_public_IP}, port is {61111}
[2025-10-14 19:48:37][INFO]important variables: log_level=4:INFO raw_mode=faketcp cipher_mode=aes128cbc auth_mode=md5 key=passwd_S123 local_addr=192.168.1.1:5555 remote_addr=server_public_IP:61111 socket_buf_size=1048576 
[2025-10-14 19:48:37][WARN]you can run udp2raw with non-root account for better security. check README.md in repo for more info.
[2025-10-14 19:48:37][INFO]remote_ip=[server_public_IP], make sure this is a vaild IP address
[2025-10-14 19:48:37][INFO]const_id:647ab9f8
[2025-10-14 19:48:37][INFO]run_command iptables -N udp2rawDwrW_647ab9f8_C0
[2025-10-14 19:48:37][INFO]run_command iptables -F udp2rawDwrW_647ab9f8_C0
[2025-10-14 19:48:37][INFO]run_command iptables -I udp2rawDwrW_647ab9f8_C0 -j DROP
[2025-10-14 19:48:37][INFO]run_command iptables -I INPUT -s server_public_IP -p tcp -m tcp --sport 61111 -j udp2rawDwrW_647ab9f8_C0
[2025-10-14 19:48:37][WARN]auto added iptables rules
[2025-10-14 19:48:37][INFO]source_addr is now 10.66.66.2
[2025-10-14 19:48:37][INFO]using port 14534
[2025-10-14 19:48:37][INFO]state changed from client_idle to client_tcp_handshake
[2025-10-14 19:48:37][INFO](re)sent tcp syn
[2025-10-14 19:48:37][INFO]state changed from client_tcp_handshake to client_handshake1
[2025-10-14 19:48:37][INFO](re)sent handshake1
[2025-10-14 19:48:39][INFO](re)sent handshake1
[2025-10-14 19:48:40][INFO](re)sent handshake1
[2025-10-14 19:48:41][INFO](re)sent handshake1
[2025-10-14 19:48:42][INFO](re)sent handshake1
[2025-10-14 19:48:43][INFO]state back to client_idle from client_handshake1
[2025-10-14 19:48:43][INFO]source_addr is now 10.66.66.2
[2025-10-14 19:48:43][INFO]using port 32246
[2025-10-14 19:48:43][INFO]state changed from client_idle to client_tcp_handshake
[2025-10-14 19:48:43][INFO](re)sent tcp syn
[2025-10-14 19:48:43][INFO]state changed from client_tcp_handshake to client_handshake1
[2025-10-14 19:48:43][INFO](re)sent handshake1
[2025-10-14 19:48:44][INFO](re)sent handshake1
[2025-10-14 19:48:45][INFO](re)sent handshake1
[2025-10-14 19:48:47][INFO](re)sent handshake1
[2025-10-14 19:48:48][INFO](re)sent handshake1
[2025-10-14 19:48:48][INFO]state back to client_idle from client_handshake1
[2025-10-14 19:48:49][INFO]source_addr is now 10.66.66.2
[2025-10-14 19:48:49][INFO]using port 63433
[2025-10-14 19:48:49][INFO]state changed from client_idle to client_tcp_handshake
[2025-10-14 19:48:49][INFO](re)sent tcp syn
[2025-10-14 19:48:49][INFO]state changed from client_tcp_handshake to client_handshake1
[2025-10-14 19:48:49][INFO](re)sent handshake1
[2025-10-14 19:48:50][INFO](re)sent handshake1
[2025-10-14 19:48:51][INFO](re)sent handshake1
[2025-10-14 19:48:52][INFO](re)sent handshake1
[2025-10-14 19:48:53][INFO](re)sent handshake1
[2025-10-14 19:48:54][INFO]state back to client_idle from client_handshake1
[2025-10-14 19:48:54][INFO]source_addr is now 10.66.66.2
[2025-10-14 19:48:54][INFO]using port 12471
[2025-10-14 19:48:54][INFO]state changed from client_idle to client_tcp_handshake
[2025-10-14 19:48:54][INFO](re)sent tcp syn
[2025-10-14 19:48:54][INFO]state changed from client_tcp_handshake to client_handshake1
[2025-10-14 19:48:54][INFO](re)sent handshake1
[2025-10-14 19:48:55][INFO](re)sent handshake1
[2025-10-14 19:48:57][INFO](re)sent handshake1
^C[2025-10-14 19:48:57][INFO]got sigint, exit
[2025-10-14 19:48:57][INFO]run_command iptables -D INPUT -s server_public_IP -p tcp -m tcp --sport 61111 -j udp2rawDwrW_647ab9f8_C0
[2025-10-14 19:48:57][INFO]run_command iptables -F udp2rawDwrW_647ab9f8_C0
[2025-10-14 19:48:57][INFO]run_command iptables -X udp2rawDwrW_647ab9f8_C0

UPD: it only happens with --raw-mode faketcp while using udp or icmp does allow to establish the connection

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