Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - nsolucoes_ti

#1
Hello,

I'm facing a specific issue with FTP (plain FTP, port 21) when using OPNsense, which does not occur on pfSense or MikroTik, and I'd like to know if anyone has seen something similar.

Scenario

Firewall: OPNsense (current version)

WAN: Single WAN

Client host: 172.16.10.250

FTP client: FileZilla (also tested via CLI)

Server: External FTP server in the cloud

Protocol: Plain FTP (no TLS)

Problem

FTP connection works

Login works

Initial commands work

On LIST / LS, the server immediately returns:

501 server cannot accept argument


This happens right after PASV, before any data connection is established (so it's not a timeout or blocked port).

Tests already done

Firewall rules allowing all traffic

Outbound NAT (auto, hybrid, manual)

MTU changes

Disable scrub / normalization (GUI + tunables)

Disable reply-to

IDS/IPS disabled

Single WAN

Active/passive mode tests

EPSV disabled

➡️ Issue persists only on OPNsense.

Comparison

pfSense: works

MikroTik: works

OPNsense: fails with 501 on LIST

Packet capture findings

PASV → server replies 227 Entering Passive Mode

Immediately after, server sends 501

Indicates command rejection, not blocked data channel

Payload is logically the same, but TCP segmentation/reassembly differs

FTP server appears not tolerant to normalized/fragmented commands

FTP Proxy plugin

Tested os-ftp-proxy, but:

It is not a transparent FTP helper

Requires changing client port/endpoint

Does not behave like the old FTP ALG

Not suitable without modifying clients

Question

Is this a known incompatibility between OPNsense PF TCP normalization and some FTP servers?

Is there any way to:

Fully disable TCP normalization for FTP?

Pass FTP traffic completely untouched?

Any known regression or workaround?

Thanks in advance for any insight.
#2
Olá,

estou enfrentando um problema específico com FTP puro (porta 21) ao utilizar OPNsense, que não ocorre em pfSense nem em MikroTik, e gostaria de saber se alguém já passou por algo semelhante.

Cenário

Firewall: OPNsense (versão atual)

WAN: single WAN

Host cliente: 172.16.10.250

Cliente FTP: FileZilla (testado também via terminal)

Servidor: FTP externo em nuvem

Protocolo: FTP puro (sem TLS)

Problema

Conexão FTP funciona

Autenticação funciona

Comandos iniciais funcionam

Ao executar LIST / LS, o servidor retorna imediatamente:

501 server cannot accept argument


O erro ocorre logo após o comando PASV, antes de qualquer tentativa de abrir o canal de dados (não é timeout nem bloqueio de porta).

Testes realizados

Regras de firewall liberando tudo

NAT outbound (automático, híbrido e manual)

Ajustes de MTU

Desativação de scrub/normalização (GUI e tunables)

reply-to desativado

IDS/IPS desativado

Testes com modo ativo/passivo

EPSV desativado

Ambiente com single WAN

➡️ O problema persiste apenas no OPNsense.

Comparação

pfSense: funciona normalmente

MikroTik: funciona normalmente

OPNsense: falha no LIST com erro 501

Análise de pacotes

PASV → servidor responde 227 Entering Passive Mode

Em seguida, o servidor retorna 501

Indica rejeição do comando, não falha de conexão de dados

O payload lógico é o mesmo, porém o comportamento TCP (segmentação / reassembly) difere

O servidor FTP aparenta não aceitar comandos normalizados ou fragmentados

Plugin FTP Proxy

Foi testado o plugin os-ftp-proxy, porém:

Não é um helper FTP transparente

Exige alteração de porta/endereço no cliente

Não substitui o antigo FTP ALG

Não resolve sem modificar os clientes

Pergunta

Isso é uma incompatibilidade conhecida entre a normalização TCP do PF no OPNsense e alguns servidores FTP?

Existe alguma forma de:

Desativar completamente a normalização TCP para FTP?

Permitir que o tráfego FTP passe "intacto"?

Algum workaround ou regressão conhecida?

Agradeço qualquer contribuição ou experiência semelhante.