Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
November 23, 2024, 12:53:25 PM
News
: LinuxSolved.com Linux Help Community Forum..
Home
Search
Login
Register
Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
»
Network Troublshooting
»
Linux Servers Support
»
iptables question.
« previous
next »
Print
Pages: [
1
]
Author
Topic: iptables question. (Read 6916 times)
nondescriptcitizens
New Member
Posts: 1
iptables question.
«
on:
December 04, 2012, 02:48:42 AM »
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: 1.1.1.1/255.255.255.248
Squid listens on port 3124
So far I have the following script for my iptables.
iptables -F
iptables -t nat -F
iptables -X
iptables -P FORWARD DROP
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
iptables -A INPUT -p tcp --dport 3124 -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
Is this correct? Will this allow all my LAN users access to squid while blocking outward attempts from the net to my server?
Thanks in advance!
-Ash
Logged
keen_prat
Linux Noob !
Posts: 21
Re: iptables question.
«
Reply #1 on:
December 07, 2012, 06:53:30 AM »
As far as I know, you don't need to take all that trouble, in squid.conf you can set it to listen to local IP only and thats it.
Logged
Print
Pages: [
1
]
« previous
next »
Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
»
Network Troublshooting
»
Linux Servers Support
»
iptables question.