LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Routing all internet traffic through a proxy (https://www.linuxquestions.org/questions/linux-newbie-8/routing-all-internet-traffic-through-a-proxy-607655/)

dnoy 12-24-2007 11:50 AM

acid_kewpie, youre right i just keep writing these posts too fast.

BTW, do you know a way to set the global environment so everything uses this?

So far i have edited the following with no luck:
/etc/profile
/etc/environment

I have an apache server that has rss fees setup and it needs to get those pages (http traffic). I have read other posts with no effective answers on implementing global environments so everyone will use it (www-data).

Again sorry for the all traffic

s3gfault 12-29-2007 08:15 AM

Quote:

Originally Posted by dnoy (Post 3000627)
acid_kewpie, youre right i just keep writing these posts too fast.

BTW, do you know a way to set the global environment so everything uses this?

So far i have edited the following with no luck:
/etc/profile
/etc/environment

I have an apache server that has rss fees setup and it needs to get those pages (http traffic). I have read other posts with no effective answers on implementing global environments so everyone will use it (www-data).

Again sorry for the all traffic

The OS is not proxy aware. Each application must have it's own support for using a proxy. Some applications may be checking your http_proxy enviroment variable, but i don't believe apache will. So even if you execute apache with, say,
Code:

HTTP_PROXY="hostname:port" httpd
command line your rss feeds will still be borked.

Luckily you should be able to load mod_proxy.so and maybe a few other modules (mod_proxy_http.so?) and set up proxy directives in httpd.conf. Check apache's documentation for this.

pgibsonorg 08-29-2011 07:16 AM

Quote:

Originally Posted by Tinkster (Post 2995009)
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 ....

I think it's very arrogant and annoying the way this question is shot down.
In terms that might be more understood:
I have a computer with 2 NIC's
I have dhcpd and a switch...
I want all traffic passing through this computer to be 'proxified' whether it's via tor, via vpn, or w/e, I want the traffic to not originate from my ISP.
How do I do this transparently with no configuration on the client side?

acid_kewpie 08-29-2011 12:27 PM

Quote:

Originally Posted by pgibsonorg (Post 4456064)
I think it's very arrogant and annoying the way this question is shot down.
In terms that might be more understood:
I have a computer with 2 NIC's
I have dhcpd and a switch...
I want all traffic passing through this computer to be 'proxified' whether it's via tor, via vpn, or w/e, I want the traffic to not originate from my ISP.
How do I do this transparently with no configuration on the client side?

please don't drag up dead threads, it gets very confusing. Please start a new thread for your own queries.

pgibsonorg 09-03-2011 03:03 PM

This post is the first or second hit in google for questions like this so it might be nice to have it answered here rather than in another post...
http://www.google.com/search?q=route...hrough+a+proxy

iobsd 10-11-2014 10:25 PM

Discouraged
 
As a person of authority within the UNIX / linux community, I believe it is moderator responsibility to help those with a lesser understanding of the subject than themselves. I was surprised in reading this form, I found the responses to be more degrading than educational. We need to get over our superiority complex, individual knowledge may vary and not everyone will be as educated as yourself. It is our responsibility as members of the UNIX / linux community to help educate those around us. Such behavior is counter-productive to those who wish to further their understanding.

samarth_math 09-17-2016 07:03 PM

Here's the answer :
 
https://samtinkers.wordpress.com/my-glossary-of-useful-commands/

sudo route add -net <network-address-to-bypass:172.22.0.0> netmask <as per netwok address : 255.255.0.0> gw <router/gateway-address :10.0.0.1> – to edit iptables to let packets addressed to a certain network go through the normal gateway, (useful for VPN where all traffic is routed through an external gateway)

hey, here's an answer. I used to use this in my college time.
Basically the gateway is where you enter the local IP of the thing you wanna direct your traffic to.

If you have a basic knowledge of networks, you'd figure out the first two parts. That's for directing only a part of your traffic through a gateway.

In order to direct ALL the traffic :


sudo route add default gw 192.168.0.1

opsec_ 02-07-2022 01:21 PM

Clarification
 
Quote:

Originally Posted by acid_kewpie (Post 2995078)
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.

Just want to clarify for anyone stumbling upon this today. The quoted claim is just false. If I cite wikipedia:

Quote:

In computer networking, a proxy server is a server application that acts as an intermediary between a client requesting a resource and the server providing that resource.
hxxps://en.wikipedia.org/wiki/Proxy_server

This means a proxy can be used for *any* traffic you like. What the quoted person (and probably also the thread poster) was likely referring to is an under-category of a proxy: A HTTP(s) or SOCKS Proxy which indeed is only meant for specific HTTP traffic.
I know this post is 15 years old but I could not resist clarifying this, as this is still the first result appearing if someone searches "linux proxy route all traffic".

ondoho 02-08-2022 03:14 AM

Here's something else acid_kewpie wrote - 11 years ago:
Quote:

Originally Posted by acid_kewpie (Post 4456277)
please don't drag up dead threads, it gets very confusing. Please start a new thread for your own queries.

And what's with the hxxps in your post? Why would you obfuscate any link, let alone a wikipedia link?

boughtonp 02-08-2022 11:56 AM

Quote:

Originally Posted by ondoho (Post 6326924)
And what's with the hxxps in your post? Why would you obfuscate any link, let alone a wikipedia link?

Possibly because new users can get moderated if posts contains links.



All times are GMT -5. The time now is 02:42 AM.