winapps icon indicating copy to clipboard operation
winapps copied to clipboard

`modprobe ip_tables` enable share folder with windows, but meet `system error 104: Connection reset by peer` problem

Open Kelatte opened this issue 11 months ago • 2 comments

i run podman-compose --file ~/.config/winapps/compose.yaml up and meet the ip_tables problem. in windows, the tsclient is empty.

[windows] | iptables v1.8.11 (legacy): can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
[windows] | Perhaps iptables or your kernel needs to be upgraded.
[windows] | ❯ ERROR: The 'ip_tables' kernel module is not loaded. Try this command: sudo modprobe ip_tables iptable_nat
[windows] | ❯ Warning: falling back to usermode networking! Performance will be bad and port mapping will not work.

i follow the instruction 'sudo modprobe ip_tables iptable_nat'. in VNC, i find that the mount works. but using xfreerdp failed:

xfreerdp /v:127.0.0.1 /u:docker /p:                                                                                                       
[17:17:34:498] [8459:0000210b] [WARN][com.freerdp.core.rdp] - [log_build_warn][0x5642534e4bf0]: *************************************************
[17:17:34:498] [8459:0000210b] [WARN][com.freerdp.core.rdp] - [log_build_warn][0x5642534e4bf0]: This build is using [runtime-check] build options:
[17:17:34:498] [8459:0000210b] [WARN][com.freerdp.core.rdp] - [log_build_warn][0x5642534e4bf0]: * 'WITH_VERBOSE_WINPR_ASSERT=ON'
[17:17:34:499] [8459:0000210b] [WARN][com.freerdp.core.rdp] - [log_build_warn][0x5642534e4bf0]:
[17:17:34:499] [8459:0000210b] [WARN][com.freerdp.core.rdp] - [log_build_warn][0x5642534e4bf0]: [runtime-check] build options might slow down the application
[17:17:34:499] [8459:0000210b] [WARN][com.freerdp.core.rdp] - [log_build_warn][0x5642534e4bf0]: *************************************************
[17:17:34:499] [8459:0000210b] [ERROR][com.winpr.crypto.hash] - [winpr_Digest_Init_Internal]: Failed to initialize digest md4
[17:17:34:499] [8459:0000210b] [WARN][com.freerdp.core.rdp] - [log_build_warn_hash][0x5642534e4bf0]: *************************************************
[17:17:34:499] [8459:0000210b] [WARN][com.freerdp.core.rdp] - [log_build_warn_hash][0x5642534e4bf0]: [SSL] {Digest} build or configuration missing:
[17:17:34:499] [8459:0000210b] [WARN][com.freerdp.core.rdp] - [log_build_warn_hash][0x5642534e4bf0]:  * md4: NTLM support not available
[17:17:34:499] [8459:0000210b] [WARN][com.freerdp.core.rdp] - [log_build_warn_hash][0x5642534e4bf0]: *************************************************
[17:17:34:499] [8459:0000210b] [WARN][com.freerdp.core.rdp] - [log_build_warn_cipher][0x5642534e4bf0]: *************************************************
[17:17:34:499] [8459:0000210b] [WARN][com.freerdp.core.rdp] - [log_build_warn_cipher][0x5642534e4bf0]: [SSL] {Cipher} build or configuration missing:
[17:17:34:499] [8459:0000210b] [WARN][com.freerdp.core.rdp] - [log_build_warn_cipher][0x5642534e4bf0]: * rc4: assistance files with encrypted passwords, NTLM, RDP licensing and RDP security will not work
[17:17:34:499] [8459:0000210b] [WARN][com.freerdp.core.rdp] - [log_build_warn_cipher][0x5642534e4bf0]: *************************************************
[17:17:35:825] [8459:0000210c] [ERROR][com.freerdp.codec] - [openh264_init]: Failed to create OpenH264 decoder
[17:17:35:825] [8459:0000210c] [WARN][com.freerdp.core.codecs] - [freerdp_client_codecs_prepare]: Failed to create h264 codec context
[17:17:35:020] [8459:0000210c] [ERROR][com.freerdp.core.transport] - [transport_read_layer]: BIO_read returned a system error 104: Connection reset by peer
[17:17:35:020] [8459:0000210c] [ERROR][com.freerdp.core] - [transport_read_layer]: ERRCONNECT_CONNECT_TRANSPORT_FAILED [0x0002000D]
[17:17:35:026] [8459:0000210c] [ERROR][com.freerdp.codec] - [openh264_init]: Failed to create OpenH264 decoder
[17:17:35:026] [8459:0000210c] [WARN][com.freerdp.core.codecs] - [freerdp_client_codecs_prepare]: Failed to create h264 codec context
[17:17:35:221] [8459:0000210c] [ERROR][com.freerdp.core.transport] - [transport_read_layer]: BIO_read returned a system error 104: Connection reset by peer
[17:17:35:221] [8459:0000210c] [ERROR][com.freerdp.core] - [transport_read_layer]: ERRCONNECT_CONNECT_TRANSPORT_FAILED [0x0002000D]
[17:17:35:221] [8459:0000210c] [ERROR][com.freerdp.core] - [freerdp_connect]: freerdp_post_connect failed

here is my lsmod before modprobe ip_tables:

lsmod | grep -E 'nat|ip_'                   

nft_nat                12288  3
nft_chain_nat          12288  6
nf_nat                 65536  3 nft_nat,nft_masq,nft_chain_nat
nf_conntrack          192512  6 nf_nat,nft_ct,nft_nat,nf_conntrack_netbios_ns,nf_conntrack_broadcast,nft_masq
ip_set                 69632  0
nf_tables             413696  423 nft_ct,nft_nat,nft_reject_inet,nft_fib_ipv6,nft_fib_ipv4,nft_masq,nft_chain_nat,nft_reject,nft_fib,nft_fib_inet
nfnetlink              24576  4 nf_tables,ip_set

system info: fedora silberblue 41 6.12.8-200.fc41.x86_64 winapps latest branch.

Any help is appreciated !

Kelatte avatar Jan 22 '25 09:01 Kelatte

Almost the same here, with 1st error message being "permission denied" instead of "table does not exist".

OS: Bluefin (Version: 41.20250421.1 / FROM Fedora Silverblue 41)
podman version 5.4.2

✦ ❯ lsmod | grep iptable_nat
   159:	iptable_nat            12288  0
   160:	ip_tables              32768  1 iptable_nat
   161:	nf_nat                 69632  6 nft_nat,nf_nat_tftp,nft_masq,nft_chain_nat,iptable_nat,xt_MASQUERADE

✦ ❯ lsmod | grep ip_table
   160:	ip_tables              32768  1 iptable_nat
[windows] | ❯ Building Windows 10 image...
[windows] | ❯ Creating a 32 GB growable disk image in raw format...
[windows] | iptables v1.8.11 (legacy): can't initialize iptables table `nat': Permission denied (you must be root)
[windows] | Perhaps iptables or your kernel needs to be upgraded.
[windows] | ❯ ERROR: The 'ip_tables' kernel module is not loaded. Try this command: sudo modprobe ip_tables iptable_nat
[windows] | ❯ Warning: podman detected, falling back to user-mode networking!
[windows] | ❯ Notice: port mapping will not work without "USER_PORTS" now.
[windows] | ❯ Booting Windows using QEMU v9.2.92...

maphew avatar May 04 '25 14:05 maphew

looks related: https://github.com/dockur/windows/issues/1128, with a possible workaround using a shell script so you don't have to modify Fedora Silverblue or grant the container unnecessary permissions. It uses an external container to share files with host.

maphew avatar May 04 '25 14:05 maphew