LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 12-18-2007, 12:44 PM   #1
dnoy
Member
 
Registered: Nov 2007
Posts: 69

Rep: Reputation: 15
Routing all internet traffic through a proxy


Can anyone assist me to route all internet traffic trough a specific proxy (192.168.0.1).

Thanks,
 
Old 12-18-2007, 01:01 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,379

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
that's not possible. routing is *not* proxying... it just doesn't make sense... if by "internet traffic" you actually mean web http traffic then you could use a transparent proxy redirecting port 80, but that's absolutely not a case of routing through a proxy.

http://www.faqs.org/docs/Linux-mini/...rentProxy.html
 
Old 12-18-2007, 01:05 PM   #3
dnoy
Member
 
Registered: Nov 2007
Posts: 69

Original Poster
Rep: Reputation: 15
youre right i just want to forward all internet based requests to a proxy since i cant make direct connections to the internet.
 
Old 12-18-2007, 01:17 PM   #4
dnoy
Member
 
Registered: Nov 2007
Posts: 69

Original Poster
Rep: Reputation: 15
is this the only way to redirect internet traffic to the internet?
 
Old 12-18-2007, 01:48 PM   #5
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian jessie/sid; OpenSuSE; Fedora
Posts: 1,591

Rep: Reputation: 162Reputation: 162
192.168.0.1 is a private IP that is used by many local area networks. If you're connected to a router, and the address of the router is 192.168.0.1, the router itself should give all the machines connected to it an IP address by DHCP. The router automatically routes traffic to and from the Internet if there is a modem plugged into it, and the Internet connection is active.
 
Old 12-18-2007, 02:02 PM   #6
dnoy
Member
 
Registered: Nov 2007
Posts: 69

Original Poster
Rep: Reputation: 15
What???? im not talking about a router. i need to redirect all traffic through a proxy. 192.168.0.1 is the address of the proxy
 
Old 12-18-2007, 02:29 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,966
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
I suggest you go to wikipedia and read up on the words router and proxy,
then find out what 192.168.0.1 *really* is, and then come back with a
well-formed and thought-through question ....


Cheers,
Tink
 
Old 12-18-2007, 02:33 PM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,379

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
all traffic != proxy.
 
Old 12-18-2007, 03:03 PM   #9
dnoy
Member
 
Registered: Nov 2007
Posts: 69

Original Poster
Rep: Reputation: 15
Tink,

Thanks but i dont need the re-education. I simply cannot make a direct connection to the internet and need to use a proxy for all traffic destined to the internet. So, again how do you do this in linux (debain). In my example 192.168.0.1 is the IP address of the proxy.
 
Old 12-18-2007, 03:38 PM   #10
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,379

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
So, again you can NOT send "all traffic destined to the internet" through a proxy. that would include, ssh, ntp, imap, smtp, icmp and all sorts of stuff that goes on. I've already given you a reference to setting up a transparent web proxy filter, which will allow http and https traffic to go through a proxy, but you've said nothing whatsoever about your infrastructure, so i've no idea if it's the right thing to do or not. you've not even mentioned Linux at all...
 
Old 12-18-2007, 04:06 PM   #11
dnoy
Member
 
Registered: Nov 2007
Posts: 69

Original Poster
Rep: Reputation: 15
ok let me try again,

I have a machine that needs to use the internet for getting various things: rss feeds(http), http, https,etc ---mostly web traffic

i am using an app on my linux box called e107 for my web site. This site needs internet access for various things and since i dont have a direct connection nothing works. I also have debain and like to use apt-get. So i would like to pass everything through the proxy (http, ftp, https). I understand that some protocols will not work through the proxy (ssh, snmp, etc). On top of this i would also like to specify a specific user-agent that needs to be used to use the proxy.

Does that make sense?
 
Old 12-18-2007, 05:01 PM   #12
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,966
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
Quote:
Originally Posted by dnoy View Post
Tink,

Thanks but i dont need the re-education. I simply cannot make a direct connection to the internet and need to use a proxy for all traffic destined to the internet. So, again how do you do this in linux (debain). In my example 192.168.0.1 is the IP address of the proxy.
I don't know about that ;}

You apparently fail to distinguish between "ALL TRAFFIC" and
"ALL WEB-TRAFFIC", which makes all the difference on this.

The big deal will be whether name-resolution is going to magically
work, and whether that proxy (OS, Software, ... ?) will be happy
to let you through. Also depends on the application you're intending
to use, and whether it's proxy aware or not. If it's just after
a direct route and has no knowledge of proxies, and you're not in
charge of the gateway machine, you're screwed.

Quote:
i am using an app on my linux box called e107 for my web site. This site needs internet access for various things and since i dont have a direct connection nothing works. I also have debain and like to use apt-get. So i would like to pass everything through the proxy (http, ftp, https). I understand that some protocols will not work through the proxy (ssh, snmp, etc). On top of this i would also like to specify a specific user-agent that needs to be used to use the proxy.
User-agent? You can tell a proxy to prompt for a name/password.
What do you mean by user-agent in this context?


Cheers,
Tink
 
Old 12-18-2007, 05:16 PM   #13
dnoy
Member
 
Registered: Nov 2007
Posts: 69

Original Poster
Rep: Reputation: 15
look up user-agent string. Yes i could reconfigure the proxy but thats not the case. i need to leave the proxy as it is a use a predefined user agent. I think i might just have to tunnel my traffic to another machine that has a direct internet connection. I think that might be the only way to complete this task.


BTW, my DNS works so there is no resolve problem. The proxies also have DNS capabilities.
 
Old 12-24-2007, 08:56 AM   #14
dnoy
Member
 
Registered: Nov 2007
Posts: 69

Original Poster
Rep: Reputation: 15
Guys, i figured out how to direct all traffic through a proxy. This is probably not the only way but a way that i found useful. This is setting up a proxy setting in your environment variables.

First type env to see your environment. After this is complete you will need to type in export http_proxy=http://192.168.0.1:9021 or whatever ip and port you are using.

If anyone finds other ways please let me know. I would also like to know how to spoof a user agent if anyone knows.
 
Old 12-24-2007, 09:03 AM   #15
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,379

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
yet again that is *NOT* all traffic by a long long way.... that is HTTP traffic only.
 
1 members found this post helpful.
  


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
routing traffic from one interface to another a550ee Linux - Networking 0 07-08-2007 03:28 PM
All internet traffic needs to go through a proxy! yumingtian Linux - Networking 3 08-29-2005 08:36 PM
routing traffic out different eth#?? cjs500 Linux - Networking 3 07-11-2005 12:59 AM
Routing traffic fuelinjection Linux - Networking 3 04-01-2005 05:51 PM
inbound traffic routing beowulfde Linux - Networking 2 02-20-2005 04:47 PM


All times are GMT -5. The time now is 05:40 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration