So Lost....have you ever tried to do this? HELP!

A place to ask all newbie questions and not get flamed, though you will get beaten down if you post a newbieish question outside of these walls.
Post Reply
fischju
Newbie
Posts: 3
Joined: Sat Sep 09, 2006 4:02 am

So Lost....have you ever tried to do this? HELP!

Post by fischju »

I recently upgraded the HDD in my xbox and had spare space to install a linux distro, and I picked gentoox. The reason I did this is because i wanted a deticated proxy server, probably running squid (squid-cache.org...can i make an open proxy with that software? can i enable password protection?)

Anyway, I dont want to scoure internet pages for the next 3 weeks mastering linux to set up a deticated server which i will probably never touch again so please help, How can I intall/use Squid with gentoox?
orochi
Gentoox Guru!
Posts: 606
Joined: Sun Oct 24, 2004 8:11 am

Post by orochi »

fischju
Newbie
Posts: 3
Joined: Sat Sep 09, 2006 4:02 am

Post by fischju »

ok i have a new idea...im going to use apache to make the server then use some kind of php proxy software....i downloaded the source for it but dont know how to compile.....
Image
Image
Image
orochi
Gentoox Guru!
Posts: 606
Joined: Sun Oct 24, 2004 8:11 am

Post by orochi »

fischju
Newbie
Posts: 3
Joined: Sat Sep 09, 2006 4:02 am

Post by fischju »

to use that i have to have a server, like my xbox running gentoox running apache, but i cant do that BECAUSE I DONT KNOW HOW TO RUN/COMPILE IT
Image
Image
Image
orochi
Gentoox Guru!
Posts: 606
Joined: Sun Oct 24, 2004 8:11 am

Post by orochi »

First of all chill, no one here is going to do your work for you. Checkout my second post, there is a link under "Apache" and that will show you step by step to install Apache. You will also need to install mod_perl, it is also located at gentoo-wiki.org



Ill break it down for you.

Install Apache
http://gentoo-wiki.com/Apache2_Install
Install CGI
http://gentoo-wiki.com/Apache_Modules_mod_perl
Lastly, install CGI:Proxy in your /var/www/localhost/cgi-bin/ directory
http://www.jmarshall.com/tools/cgiproxy/

each of these pages has the info to respectively setup each component.

I would also suggest you checking out the Gentoo documentation, it may answer alot of your questions faster than we might be able to respond here.

http://www.gentoo.org/doc/en/index.xml

goodluck!
ShALLaX
Site Admin
Posts: 1973
Joined: Sun Aug 10, 2003 9:25 pm
Location: England
Contact:

Post by ShALLaX »

There's even an Apache HOWTO on the Gentoox website.

People wont just tell you what to do - because the information is already out there on the internet. Take a little time to research stuff yourself first. We are not your system admins ;)
The original Xbox adaptation of Gentoo
gnif
Novice
Posts: 42
Joined: Wed Sep 13, 2006 2:07 pm

Post by gnif »

why are you trying to use Apache as a proxy?... bad, dont do this! *smacks hand*

install "squid"

then in your browsers proxy config set the proxy to your xbox... or to make it transparent (better in my opinion)... do the following.

in the squid.conf turn on the following (and any caching settings):

Code: Select all

httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
make sure you have ip_forward turned on (google how to do this)

then you need to forward port 80(http) to port 3128 (squid), use iptables:

Code: Select all

# iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
you need to also proxy dns requests, so install "dnsmasq"

Then set your client computer's gateway to the IP of the proxy box (xbox)

this will enable transparent proxying.. but, you need to forward all other traffic still, at this point only port 80 will work.

So run this:

Code: Select all

# iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to GATEWAY
Replace "GATEWAY" with the IP address of your router/gateway.

The iptables settings will not be persistant across boots, so put them in a script and make it execute on startup.

If i missed anything... someone please correct me.
Last edited by gnif on Thu Sep 14, 2006 11:46 pm, edited 1 time in total.
orochi
Gentoox Guru!
Posts: 606
Joined: Sun Oct 24, 2004 8:11 am

Post by orochi »

thats a setup for a transparent proxy, and requires iptables, i dont remember it being installed by default in gentoox (or atleast ive never used it or had a problem with needing to deal with it)
gnif
Novice
Posts: 42
Joined: Wed Sep 13, 2006 2:07 pm

Post by gnif »

adding it is not hard...

just get the kernel source from the reposotory... and do a "make menuconfig", turn the option on, and compile.

then just emerge the iptables tools
set the proxy to your xbox... or to make it transparent (better in my opinion)... do the following.
I said it was only nessary if you wanted it to be transparent... if you dont care for it, just install squid, the defaults should just work. If not, I am happy to help.
orochi
Gentoox Guru!
Posts: 606
Joined: Sun Oct 24, 2004 8:11 am

Post by orochi »

or just use /usr/src/linux, magic updates this as nessessary
Post Reply