Results 1 to 1 of 1
  1. #1
    Join Date
    Dec 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    iptables question.

    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




 

 

Similar Threads

  1. Two hardrive question
    By animaguy in forum Linux Hardware
    Replies: 6
    Last Post: 08-08-2012, 01:22 PM
  2. Webmin question
    By MustangV10 in forum Web Server
    Replies: 1
    Last Post: 07-13-2012, 10:16 PM
  3. Newb Question
    By Brandon Buster in forum General Linux
    Replies: 3
    Last Post: 06-15-2012, 10:19 PM
  4. Newbie question
    By spiderman in forum Getting Started
    Replies: 19
    Last Post: 06-08-2012, 08:33 PM
  5. A question?
    By David Wilson in forum Desktop / X
    Replies: 6
    Last Post: 03-11-2012, 11:33 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
           








Check out Linux Central for Linux software and other goodies!





» Stats

Members: 3,590
Threads: 3,921
Posts: 9,452
Top Poster: Fred (1,486)
Welcome to our newest member, Pejii

» Links



Powered by vBadvanced CMPS