LinuxQuestions.org
Review your favorite Linux distribution.
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 08-16-2011, 10:54 AM   #1
dragos240
Member
 
Registered: Apr 2009
Posts: 64

Rep: Reputation: 15
How do I setup a proxy system wide?


I know how to setup proxies inside a program, but is there a good way to setup a system wide proxy? I have a proxy running on my other computer. The reason I want to do this is because my network is setup like this:

Internet -> Router -> Netbook -> My Desktop

I have my netbook forwarding requests to my desktop. I can browse the web and do anything. But I can't access other computers on my network. On my netbook, it takes wlan0 and forwards it to eth0, eth0 uses 192.168.0.0/24, the network that comes from my router is 192.168.1.0/24.

So I can access other systems in my network on my netbook, but not the desktop. I run a squid server on the netbook, and when my desktop connects to that, it runs just as fast really and I'm able to access the network. The problem is I can only use this with firefox, and not every program. They will just try to use the network I set up, not the proxy server. Can I set up my desktop to use squid's proxy system wide? Or will I need a SOCKS proxy? If I do need a SOCKS proxy, can someone point me towards a good tutorial? A system wide proxy seems to be the solution here until I get another wireless card. Or maybe there's a way to use iptables to forward connections from 192.168.1.0/24?

Any ideas are appreciated.

Thanks,
Dragos240
 
Old 08-16-2011, 12:38 PM   #2
TimothyEBaldwin
Member
 
Registered: Mar 2009
Posts: 249

Rep: Reputation: 27
You need neither a proxy or iptables to solve your problem, though if you have iptables configured to block stuff you may need to change it.

Enable IP forwarding on your netbook, so it becomes a router and add a route table entry on your router appliance so that it forwards traffic for your desktop to your netbook.
 
Old 08-16-2011, 01:58 PM   #3
dragos240
Member
 
Registered: Apr 2009
Posts: 64

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by TimothyEBaldwin View Post
You need neither a proxy or iptables to solve your problem, though if you have iptables configured to block stuff you may need to change it.

Enable IP forwarding on your netbook, so it becomes a router and add a route table entry on your router appliance so that it forwards traffic for your desktop to your netbook.
This is what I run so that it forwards the connections from my netbook to my desktop:
Code:
/etc/rc.d/networkmanager stop
/etc/rc.d/gpm start
/etc/rc.d/iptables start
/etc/rc.d/dnsmasq start
iptables -A FORWARD -o wlan0 -i eth0 -s 192.168.0.0/24 -m conntrack --ctstate NEW -j ACCEPT
iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
iptables -A POSTROUTING -t nat -j MASQUERADE
/etc/rc.d/iptables save
ifconfig eth0 192.168.0.101 netmask 255.255.255.0 broadcast 10.0.0.255
ifconfig wlan0 up
ifconfig eth0 up
echo 1 > /proc/sys/net/ipv4/ip_forward
After running this, I use iwlist, iwconfig and dhcpcd to connect to my network.
 
  


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
[SOLVED] How do I ... achieve system-wide proxy settings hgriggs Slackware 11 09-13-2012 07:05 PM
Edit system wide kmenu as system administrator. okos Linux - Newbie 3 06-22-2009 10:02 PM
Using ISA Server as Parent Proxy and want to setup Squid as dwonstream proxy tauseef1 Red Hat 1 04-09-2008 01:03 AM
How do I set a system wide proxy setting? iAlta Linux - Wireless Networking 3 11-28-2007 05:58 AM
Set System Wide Proxy Address TomGibbons Linux - Security 9 08-24-2006 12:48 AM

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

All times are GMT -5. The time now is 10:27 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