LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-25-2012, 07:01 AM   #31
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974

oh fair enough...

so if you want to be a proxy you could run squid, but you'd probably just prefer to use a socks connection forwarded over ssh / putty. just set a dynamic port on putty or use "-D <port number>" on an ssh client command and use that port as a socks proxy in your browser once you are ssh'd into the remote server.
 
Old 04-25-2012, 10:36 AM   #32
Raakh5
Member
 
Registered: Mar 2012
Posts: 167

Original Poster
Rep: Reputation: Disabled
Thanks TobiSGD for your favorable reply. This link made my life very easy. Everything gone very good but I stuck on this step of link:

Code:
-A RH-Firewall-1-INPUT -m state --state NEW,ESTABLISHED,RELATED -m tcp -p tcp --dport 3128 -j ACCEPT
When I am adding this and restarting iptables then it throws following error:
Code:
# /etc/init.d/iptables restart
Flushing firewall rules:                                   [  OK  ]
Setting chains to policy ACCEPT: filter                    [  OK  ]
Unloading iptables modules:                                [  OK  ]
Applying iptables firewall rules: iptables-restore: line 7 failed
                                                           [FAILED]

EDIT:
Quote:
acl our_networks src 192.168.1.0/24 192.168.2.0/24
http_access allow our_networks
I have written my server online ip address in place of 192.168.1.0/24 192.168.2.0/24. Is that right?

Please advise

Last edited by Raakh5; 04-25-2012 at 10:45 AM.
 
Old 04-25-2012, 01:14 PM   #33
Raakh5
Member
 
Registered: Mar 2012
Posts: 167

Original Poster
Rep: Reputation: Disabled
This is how I edited iptables

Quote:
]# vi /etc/sysconfig/iptables
# Generated by iptables-save v1.3.5 on Thu Dec 29 06:28:24 2011
*filter
:INPUT ACCEPT [677:66814]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [563:75641]
-A INPUT -s xx.xx.xx.xx -j DROP
-A RH-Firewall-1-INPUT -m state --state NEW,ESTABLISHED,RELATED -m tcp -p tcp
--dport 3128 -j ACCEPT
COMMIT
# Completed on Thu Dec 29 06:28:24 2011
 
Old 04-25-2012, 02:48 PM   #34
Raakh5
Member
 
Registered: Mar 2012
Posts: 167

Original Poster
Rep: Reputation: Disabled
I changed

Quote:
-A RH-Firewall-1-INPUT -m state --state NEW,ESTABLISHED,RELATED -m tcp -p tcp
--dport 3128 -j ACCEPT
to

Quote:
-A INPUT -m state --state NEW,ESTABLISHED,RELATED -m tcp -p tcp --dport 3128 -j ACCEPT
and now there is no error. Finally I open by firefox browser and given my server IP address and port # 3128 but it says:
The connection has timed out
The server at www.google.com is taking too long to respond.

Please advise
 
Old 04-26-2012, 02:55 AM   #35
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
Again it sounds like you do not need a squid server at all, but just using PuTTY to create a socks connection to your server over SSH will be more than suitable.
 
Old 04-26-2012, 01:39 PM   #36
Raakh5
Member
 
Registered: Mar 2012
Posts: 167

Original Poster
Rep: Reputation: Disabled
Finally, I became able to achieve my goal. What I did and succeeded is as follow:

Quote:
yum install squid
vi /etc/squid/squid.conf
Change
acl our_networks src 192.168.1.0/24 192.168.2.0/24
To
acl our_networks src <your IP> (http://whatismyip.com)
and
http_port 3128 to 11223 //my ISP was blocking 3128 and I wasted one day to investigate and find the solution
chkconfig squid on
/etc/init.d/squid start
vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW,ESTABLISHED,RELATED -m tcp -p tcp --dport 3128 -j ACCEPT
/etc/init.d/iptables restart

Browser=>Internet options=>Manual Proxy Settings
Http Proxy: xx.zz.xx.xx Port: 11223
Reference: http://www.cyberciti.biz/tips/howto-...iguration.html

Thanks all from the bottom of my heart. I really learned a lot from all experts who participated and shared their ideas

Thanks again & best regards
 
Old 04-26-2012, 03:39 PM   #37
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
well done, you're now running an open proxy, prepare to for it to be discovered and have all sorts of ne'er-do-wells abuse it...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
firefox doesn't show up properly when run remotely through ssh -Y nass Slackware 12 04-06-2012 11:09 AM
How can I SSH with Firefox? SimbaSpirit Linux - Software 6 07-04-2008 11:28 PM
Firefox didn't run after Firefox 2 installation nightrider Linux - Newbie 15 04-03-2008 11:24 PM
How to run a program in an ssh session that will run after you close out the session? dr_zayus69 Linux - Networking 5 03-05-2006 08:15 PM
I Cant Run The New Firefox ziggi Linux - Newbie 2 06-12-2005 12:28 AM


All times are GMT -5. The time now is 12:57 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration