IP filtering works by allowing only pre-approved IP addresses to send emails. This is typically done through the configuration of DNS settings such as SPF (Sender Policy Framework), DKIM (DomainKeys Identified Mail), and DMARC (Domain-based Message Authentication, Reporting & Conformance). These protocols authenticate the sender's IP address and ensure that it matches the domain's approved sending IP list.