LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-16-2013, 09:07 PM   #16
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,657
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283

Why did you have to configure and make squid instead of an rpm package?
Quote:
by the way now I've compiled the squid proxy server from source code...
It's been years (and years)since I have had to do that for squid.

Still looking.....

this string...
Quote:
echo 1 > /proc/sys/net/ipv4/ip_forward
will not stick on reboot, the /etc/sysctl.conf file takes care of that, you may be switching it off with the /etc/sysctl.conf script.

for now....
 
Old 06-18-2013, 11:03 PM   #17
s4starb4boy
LQ Newbie
 
Registered: Jun 2013
Posts: 20

Original Poster
Rep: Reputation: Disabled
Quote:
Why did you have to configure and make squid instead of an rpm package?
because I want to learn and fix the issue...

Now I've decided to uninstall teh squid and only configure iptables either is it working or not...I've watched one video series on youtube I'll follow it step by step. if I am not wrong I am still stick with my words that culprit could be or is "iptables"...so I will uninstall squid and only configure the iptables ad let the client pass through it lets see what happened...

here is the link I am going to follow...
https://www.youtube.com/watch?v=zG51...lbRwkZ-X968wVI
 
Old 06-21-2013, 11:54 PM   #18
s4starb4boy
LQ Newbie
 
Registered: Jun 2013
Posts: 20

Original Poster
Rep: Reputation: Disabled
Successful!
after a long struggle at last I got the one step success...
I didn't install SQUID and decide to share internet via iptables either is it work or not...

I followed this link..

https://www.centos.org/modules/newbb...topic_id=42474

from there these commands works for me...


/sbin/iptables -A FORWARD -i eth1 -o eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
/sbin/iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE
/sbin/iptables-save > /etc/sysconfig/iptables
/sbin/service iptables restart

I've also set ip_forward to 1 in two places...

echo 1 > /proc/sys/net/ipv4/ip_forward

and

sysctl -w net.ipv4.ip_forward=1

then restarted the centOS 6.4 server and I am done!

I am very happy but now I would like to install SQUID Proxy Binary Package and would configure it as transparent PROXY SERVER.thats what I want...
 
1 members found this post helpful.
Old 06-22-2013, 07:08 PM   #19
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,657
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
Hi, you might find that iptables will complain....
Code:
 state --state
no longer supported...depreciated...

any where you see it in iptables script, replace it with
Code:
 conntrack --ctstate
So far, so good.
 
Old 06-24-2013, 11:37 PM   #20
s4starb4boy
LQ Newbie
 
Registered: Jun 2013
Posts: 20

Original Poster
Rep: Reputation: Disabled
Thanks Buddy! your given command
Quote:
conntrack --ctstate
is working too. I am going to play with SQUID in next few days.
 
Old 07-01-2013, 10:59 PM   #21
s4starb4boy
LQ Newbie
 
Registered: Jun 2013
Posts: 20

Original Poster
Rep: Reputation: Disabled
Hurrrry!
Thanks God! after a long ad long struggle now I am able to deploy SQUID as Transparent proxy server below is a rule set for iptables that works for me all other configuration remains same as above(previously posted)..

Quote:
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j DNAT --to 192.168.0.253:3128
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
iptables -I INPUT -s 192.168.0.0/16 -p tcp --dport 3128 -j ACCEPT
now I only have to set up 192.168.0.253 as gate on client machine that works for me.

I really thank you all who consider my post and gave comments and suggestions thank you all.
 
Old 07-03-2013, 12:20 AM   #22
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,657
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
Thank you, I'm glad you got it working.

Please mark your post as SOLVED. (thread tools)
 
Old 01-07-2015, 08:36 AM   #23
blodkg440
LQ Newbie
 
Registered: Jan 2015
Posts: 2

Rep: Reputation: Disabled
Unhappy Transperant proxy not working without setting proxy in web browser and also outlook is not working.

Hi this is my config... help me with your solutions

#
# Recommended minimum configuration:
#
acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
acl lan src 10.15.12.0/24
# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl localnet src fc00::/7 # RFC 4193 local private network range
acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines

acl SSL_ports port 443
acl SSL_ports port 403
acl SSL_ports port 995
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 23 #telnet
acl Safe_ports port 22 #Putty
acl Safe_ports port 53 # for dns
acl Safe_ports port 210 # ftp
acl Safe_ports port 488 # https
acl Safe_ports port 591 # gopher
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 995 #pop3
acl Safe_ports port 2525 #smtp
acl CONNECT method CONNECT

#
# Recommended minimum Access Permission configuration:
#
# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager

# Deny requests to certain unsafe ports
http_access allow CONNECT SSL_ports
http_access allow CONNECT Safe_ports
http_access deny !Safe_ports

# Deny CONNECT to other than secure SSL ports
http_access deny CONNECT !SSL_ports

# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
#http_access deny to_localhost

#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#

# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
http_access allow localnet
http_access allow localhost
http_access allow lan
# And finally deny all other access to this proxy
http_access deny all

# Squid normally listens to port 3128
#http_port 3128 transparent
http_port 3128 intercept

# We recommend you to use at least the following line.
hierarchy_stoplist cgi-bin ?

# Uncomment and adjust the following to add a disk cache directory.
#cache_dir ufs /var/spool/squid 100 16 256

# Leave coredumps in the first cache dir
coredump_dir /var/spool/squid

# Add any of your own refresh_pattern entries above these.
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320

visible_hostname localhost.localdomain




"/etc/squid/squid.conf" 92L, 3010C
 
Old 01-07-2015, 08:39 AM   #24
blodkg440
LQ Newbie
 
Registered: Jan 2015
Posts: 2

Rep: Reputation: Disabled
and my iptables are

Table: nat
Chain PREROUTING (policy ACCEPT)
num target prot opt source destination
1 DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 to:10.15.12.1:3128
2 REDIRECT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 redir ports 3128

Chain POSTROUTING (policy ACCEPT)
num target prot opt source destination

Chain OUTPUT (policy ACCEPT)
num target prot opt source destination

Table: filter
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 ACCEPT tcp -- 10.15.12.0/24 0.0.0.0/0 tcp dpt:3128

Chain FORWARD (policy ACCEPT)
num target prot opt source destination

Chain OUTPUT (policy ACCEPT)
num target prot opt source destination
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with rules in transparent squid proxy server hainguyenle89 Linux - Newbie 5 11-23-2011 01:54 AM
Squid as Transparent Proxy Server sudhirmhrj Linux - Newbie 8 07-01-2010 09:13 AM
squid proxy server and transparent issue kwaslee Linux - Server 1 04-13-2010 04:00 AM
Deploying a transparent socks 5 proxy on network hostmaster Linux - Software 0 02-13-2007 11:10 PM
transparent squid proxy server alvi2 Linux - Networking 4 02-24-2005 01:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration