nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

squid iptable problem

This is a discussion on squid iptable problem within the Proxy Servers forums, part of the Mastering Servers category; recently i implemented squid server on centos5.2.This server directly connected to public IP i.e 200.227.56.131 on eth1 and my private ...

Register free or login to your existing account and remove all advertisements.


Go Back   nixCraft Linux Forum > Mastering Servers > Proxy Servers

Linux answers from nixCraft.


Proxy Servers Discussion about UNIX / Linux caching proxy servers, web proxy, reverse / content filtering proxy server.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-13-2009, 11:38 AM
Member
User
 
Join Date: Nov 2007
OS: Debian
Posts: 31
Thanks: 0
Thanked 2 Times in 1 Post
Rep Power: 0
Rahul.Kolan is on a distinguished road
Default squid iptable problem

recently i implemented squid server on centos5.2.This server directly connected to public IP i.e 200.227.56.131 on eth1 and my private ip 10.171.200.11 connected on eth0.when i see /var/log/messages so many IPs try to login on server error showing access denied,i written iptables below is the iptable script:
#############################################
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
iptables -P FORWARD DROP
iptables -F -t nat
iptables -F -t mangle
iptables -F -t filter
iptables -X
echo 1 > /proc/sys/net/ipv4/ip_forward
# LOOPBACK
iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT
# PUBLIC INTERFACES
iptables -A OUTPUT -o eth0 -j ACCEPT
iptables -A INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
# PRIVATE INTERFACES
iptables -A INPUT -i eth1 -s 10.171.200.11/24 -j ACCEPT
iptables -A OUTPUT -o eth1 -d 0/0 -j ACCEPT
################################################## #
to this script no one connecting proxy server but Internet web pages not opening at client end.
can anyone have iptable script where i can implement on my network.


help in this regards will be highly appreciated.
Reply With Quote
  #2 (permalink)  
Old 05-13-2009, 04:56 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,695
Thanks: 11
Thanked 243 Times in 183 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Login denied message may be coming from ssh service. Try binding ssh service to private eth0 private ip by updating /etc/ssh/sshd_config and adding / updating ListenAddress:
Code:
ListenAddress  10.171.200.11
Finally, restart sshd:
Code:
service sshd restart
Also, turn off all unwanted network services. Once done, you can write a iptables based shell script to block everything. Do you run NAT using iptables? If you are new, get this script http://freshmeat.net/projects/iptables-firewall/ to configure firewall.
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help

Last edited by nixcraft; 05-13-2009 at 04:58 PM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
how to make iptable rules? saroj Networking, Firewalls and Security 7 03-11-2009 06:18 PM
Squid Transparent Proxy iptable rules Cyborg_sa CentOS / RHEL / Fedora 1 02-28-2009 09:30 PM
Squid Problem B!n@ry Linux software 3 04-15-2007 03:36 PM
problem with Squid puppen Linux software 4 01-04-2007 02:45 PM
Problem with squid LRC Linux software 17 06-10-2006 07:52 PM


All times are GMT +5.5. The time now is 10:04 PM.


Powered by vBulletin® Version 3.8.4 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2009 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38