I’ve never used iptables, and the documentation online seems a bit opaque.
I’d like to block all requests to port 8000 on my server except those coming from a specific IP address. How do I do that using iptables?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This question should be on Server Fault. Nevertheless, the following should do the trick, assuming you’re talking about TCP and the IP you want to allow is 1.2.3.4: