securitytcpudpfirewalltransport-security

how the FireWall knows if the transportation is UDP or TCP?


I'm not quite sure how the firewall can tell what transportation is being passed - TCP\UDP? also - when I have statefull VS stateless FW - I know that there is the difference when using TCP, but what about UDP? thanks alot! :)


Solution

  • The header of the packets are completely different, TCP is much bigger for example. A stateful firewall needs to intercept the TCP headers to map the packets to its state table, but also stateless firewalls sometimes have techniques implemented to recognize valid TCP or UDP headers. Most home routers (broadband/wireless) make use of this when you are using port forwarding to distinguish between both protocol versions.