I am setting up a new squid daemon to run on my server. I want to make sure that everyone inside my network can access squid but I want to make sure everyone on the internet is blocked.
eth0 is connected to my internal LAN via: 192.168.0.5/255.255.255.0
eth1 is connected to the internet via: 184.108.40.206/255.255.255.248
Squid listens on port 3124
Is this the correct syntax for doing that?:
iptables -t nat -F
iptables -P FORWARD DROP
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp --dport 3124 -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
As you can probably see I prefer to block everything except for what I'm actually using.
The tricky part is I'm not sure how to block everyone on the net but allow everyone on my local network access to squid.
Thanks in advance.