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 10-10-2005, 07:36 PM   #1
depam
Member
 
Registered: Sep 2005
Posts: 861

Rep: Reputation: 30
How to force user to use the squid server


Hi guys,

I'm having problem running my squid server as a transparent proxy. I have two network cards; one is connected to the router (192.168.1.150) and the other one is for use on the private network(192.168.0.220). I want to set up my server in such a way that I don't have to set the settings in my browser (http_proxy and port). I've read about IPROUTE and eveything but its just too complicated for me. I know someone out there is knowledgeable on this.
 
Old 10-11-2005, 12:53 AM   #2
sharma_arpit
LQ Newbie
 
Registered: Oct 2005
Posts: 8

Rep: Reputation: 0
Hi
Try the following script lines
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 \
-j REDIRECT --to-port 3128
iptables -A INPUT -j ACCEPT -m state \
--state NEW,ESTABLISHED,RELATED -i eth1 -p tcp \
--dport 3128
iptables -A OUTPUT -j ACCEPT -m state \
--state NEW,ESTABLISHED,RELATED -o eth0 -p tcp \
--dport 80

iptables -A INPUT -j ACCEPT -m state \
--state ESTABLISHED,RELATED -i eth0 -p tcp \
--sport 80
iptables -A OUTPUT -j ACCEPT -m state \
--state ESTABLISHED,RELATED -o eth1 -p tcp \
--sport 80
 
Old 10-11-2005, 02:23 AM   #3
depam
Member
 
Registered: Sep 2005
Posts: 861

Original Poster
Rep: Reputation: 30
I'm really sorry for asking this but do i just have to type it in the shell? Or should i add it on /etc/sysconfig/iptables? I have tried typing it in the shell but nothing happened. My eth0 is my connection to my router while my eth1 is my private connection. I'm really sorry if I'm asking you again. I just want to know how to do it. Thanks
 
  


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
Force an application to run only for my user purefan General 1 04-12-2005 09:30 AM
I want to force user logouts qowpal Linux - Newbie 10 09-23-2004 02:52 PM
Force user to be in a group to use su? jrbush82 Linux - Security 2 06-03-2004 09:48 PM
Force user login with different account rte Linux - Newbie 1 04-01-2004 09:09 AM
Force user ust Linux - General 1 10-09-2003 11:03 AM

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

All times are GMT -5. The time now is 07:55 AM.

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