Skip to content
KMyFirewall
Release 1.1.1 Download

The KMyFirewall Handbook

Incoming and outgoing interface

The interface options match packets by the network device they arrive on or leave through.

iptables ‑A INPUT ‑‑in‑interface eth0 ‑j LOG

The in interface option names the interface on which a packet is received. It applies to packets entering the INPUT, FORWARD and PREROUTING chains.

iptables ‑A OUTPUT ‑‑out‑interface ! ippp1 ‑j DROP

The out interface option names the interface on which a packet is sent. It applies to packets entering the FORWARD, OUTPUT and POSTROUTING chains.

A ! before the interface name inverts the match. If the name ends in +, any interface beginning with that name matches. If the option is omitted, any interface matches.

Continue with Source MAC.

Back to top