linux - Iptables: How to allow only one ip through specific port? - Server Fault

PHOTO EMBED

Sat Apr 08 2023 20:51:47 GMT+0000 (Coordinated Universal Time)

Saved by @aliqbal

iptables -I INPUT \! --src 1.2.3.4 -m tcp -p tcp --dport 777 -j DROP  # if it's not 1.2.3.4, drop it
content_copyCOPY

https://serverfault.com/questions/146569/iptables-how-to-allow-only-one-ip-through-specific-port