B
B
BobJack2014-08-18 12:24:19
iptables
BobJack, 2014-08-18 12:24:19

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

But this does not work either from the site, or, of course, when contacting directly. What to do? Where to dig?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Petrikov, 2014-08-18
@BobJack

Well, add your IP and the IP of the site from which the permissions are accessed, and don't forget the rule
iptables -A OUTPUT -p all -j ACCEPT

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question