0

iptables -t raw -A PREROUTING -p udp --dport 4578 -m string --hex-string '|fefffffffffffffffff77f12|'

How can I whitelist the IP having the above hexx string automatically on Iptables.

I'll be dropping all incoming traffic on iptables and allowing only the packet with above hex string. Whenever we receive a packet with above hex string the I want to whitelist his IP on Iptables immediately. So that all traffic from that particular IP gets passed

Thanks in Advance

New contributor
Amey Mhatre is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
7
  • This entry on stack overflow suggests using the iptables log to catch logged matches and perform actions. There's also a link there to this which suggests using nfqueue, which is probably the most robust way to do it. yesterday
  • @A.B Can you please help me with those commands? Because I really don't know regarding mark and connmark just heard about it 2 hours ago
  • @A.B I'll edit the port with the vaild values :) 2 hours ago
  • @A.B Done.. :-) 2 hours ago
  • But still: xyproblem.info
    – A.B
    2 hours ago

0

Your Answer

Amey Mhatre is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.