Answer the question
In order to leave comments, you need to log in
How to set up iptables?
Good day, Habr!
I do home video surveillance using RPi. I set up the broadcast, but now it is in the public domain. This is not gud. I'm trying to do this: close access to raspberries from all IPs, except for the ip of my VPS, on which the video will be viewed through authorization. I'm trying to do this with iptables. Does not exceed. I do:
sudo iptables -A INPUT -i eth0 -p tcp -m state --state NEW,ESTABLISHED,RELATED --dport <порт трансляции> -s <ip VPS> -j ACCEPT
sudo iptables -A INPUT -i eth0 -p tcp --dport <порт трансляции> -j DROP
Answer the question
In order to leave comments, you need to log in
Well, add your IP and the IP of the site from which the permissions are accessed, and don't forget the ruleiptables -A OUTPUT -p all -j ACCEPT
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question