LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-22-2006, 03:57 AM   #1
cryonics
LQ Newbie
 
Registered: Mar 2006
Posts: 12

Rep: Reputation: 0
Setup for Linux Server and winXP client


hi...

i'm trying to setup a linux computer as a server and windows XP as a client. So, can anyone tell me step by step how to implement the configuration?? and one more things.. i'm having these dansguardian internet filter on the server. so, does it gives impact to the configuration??
 
Old 03-22-2006, 04:14 AM   #2
paul_mat
Member
 
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855

Rep: Reputation: 30
you might want to be a little more clear on what you want, setting it up as a file server for a windows client? as a web server? as a proxy server? as a domain controller? making a linux server can mean so many things, check out my website listed below there are plently of how-to's for setting up all kinds of linux servers. if what your looking for isn't there, you might want to make your question a little more clear next time.
 
Old 03-23-2006, 12:54 AM   #3
cryonics
LQ Newbie
 
Registered: Mar 2006
Posts: 12

Original Poster
Rep: Reputation: 0
web server

thanx for the reply...

i'm having these linux as a web server and the Computer that access it is using winXP. i'm connected those two computer using the cross cable on the network card (eth1) while the linux server is using the other network card (eth0) that connected to the other server. the topology looks like below:

internet
!
!
!
main server
!
!
!
server (linux-i'm using the redhat 4 enterprise edition)
!
!
!
client (winXP)


that's all TQ
 
Old 03-23-2006, 01:23 AM   #4
paul_mat
Member
 
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855

Rep: Reputation: 30
okay, your trying to setup a web server? is that what your saying? if thats what you need help with there is plenty of information on my website about using apache in different ways.

Setup Apache2 with Access to Home Directories
Setup Apache2 with OpenLDAP Authentication
Setup Apache2 with OpenSSL
Apache2 with Webdav & htpasswd using openSSL certs
Apache2 & Virtual Hosts
Apache & Mod_Authz_Unixgroup
Apache with user access to their own home directories via webdav and openldap authentication
Mambo + MySql + PHP + Apache

but i guess the main thing you'd want to know about apache is these few things

/etc/httpd/conf/httpd.conf - main config file
/var/www/html/ - were all your webpages will go
chown apache:apache - change the ownership of your webpages so apache can serve them
/etc/init.d/httpd stop
/etc/init.d/httpd start
/etc/init.d/httpd restart
 
Old 03-28-2006, 11:00 PM   #5
cryonics
LQ Newbie
 
Registered: Mar 2006
Posts: 12

Original Poster
Rep: Reputation: 0
can't i just setup it without using those apache?? because i thought that i want to make it as a gateway for the XP so that my "internet filter" in linux can work as well....
the other things is how to connect the two network card.( the configuration for eth1 on linux and eth on winXP). i try to setup like this:

linux-eth0 --> to internet
ip-192.168.2.1
subnet-255.255.255.0
gateway-192.168.2.50

linux-eth1
ip-192.168.0.1
subnet mask-255.255.255.0
gateway-192.168.2.1

XP-eth
ip-192.168.0.2
subnet-255.255.255.0
gateway-192.168.0.1

when i ping the connection, there don't have any reaction (the connection unreachable)!! so, what's the problem??
 
Old 03-28-2006, 11:45 PM   #6
paul_mat
Member
 
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855

Rep: Reputation: 30
on my website listed below there is a how-to for setting up virtual ip addresses on machines if thats what your looking for, also you might want to look into webmin, it has some exellent networking tools on it.

it's clear that i'm not understanding what you want, but basically everything i know is on that website, check it out, if it's not up there, then i probably don't know it.

you can try once more to explain to me what your looking for,

are you looking for a proxy server? or a file server? or a web server? or all three ?
 
Old 03-29-2006, 08:28 AM   #7
cryonics
LQ Newbie
 
Registered: Mar 2006
Posts: 12

Original Poster
Rep: Reputation: 0
Red face

sorry 4 that..

actually, i've this linux computer with (dansguardian+ squid+ iptables) as a internet filter. i want to connect the winXP as a client for the linux so that it can access the internet.
so, i just connect those two with the network card. my problem: i just wanna make winXP access the internet successfully while the internet filter that i setup on linux also can work properly!!(if access from the XP). so.. it doesn't matter whether it's web server, file server or whatever as long as the winXP can access the internet through linux and the filter work for that!! that's all..... hope u understand now.
 
Old 03-29-2006, 06:53 PM   #8
paul_mat
Member
 
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855

Rep: Reputation: 30
okay, makes sense now, so let me ask you a few questions.

Have you got dansguardian installed and running?
Have you got squid installed and running?
Have you got iptables installed and running?

to find this out show me the output of

/etc/init.d/dansguardian status
/etc/init.d/squid status
/etc/init.d/iptables status

just for starters (to reduce the amount that can go wrong) turn off iptablesa

/etc/init.d/iptables stop

next tell make sure that your /etc/dansguardian/dansguardian.conf

has this in it

filterip =127.0.0.1
filterport = 8080
proxyip = 192.168.0.254(or whatever the ip address of your squid machine is)
proxyport = 3128

next you need to make sure that your squid.conf looks something like this

http_port 192.168.0.254:3128
http_port 127.0.0.1:3128

(the VERY FIRST http_access rule has to be this)
http_access allow all

then start both the services

/etc/init.d/dansguardian start
/etc/init.d/squid start

make sure they turn on at startup

chkconfig dansguardian on
chkconfig squid on

then set you browser on XP to use the following proxy settings

proxy 192.168.0.254
port 8080

in the 'tools'/'internet options' of internet explorer
 
Old 03-29-2006, 09:57 PM   #9
WRSpithead
Member
 
Registered: Mar 2005
Posts: 60

Rep: Reputation: 15
What you want is more of a router than a server. A server serves files and whatnot from a static source (like a harddrive). A router routes traffic from one computer to another. If you want the linux box to go between you and the internet, and get you there, that's a router.

What linux distrobution do you have?

paul_mat: Does he really need squid? It seems like he could fare with just iptables. Or does dansguardian require a proxy?

Last edited by WRSpithead; 03-29-2006 at 09:59 PM.
 
Old 03-29-2006, 10:35 PM   #10
paul_mat
Member
 
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855

Rep: Reputation: 30
dansguardian requires a proxy, WRSpithead is right about it being more of a router than a server and on the note of what distro are you using i see you've only had 9 posts and most are on this post i'd image, have you looked into a distro like smoothwall or IPcop? they are exellent router distro's with good web interfaces to them

Last edited by paul_mat; 03-29-2006 at 10:38 PM.
 
Old 03-30-2006, 12:43 AM   #11
cryonics
LQ Newbie
 
Registered: Mar 2006
Posts: 12

Original Poster
Rep: Reputation: 0
Cool

thanx both you two. i used redhat 4 enterprise edition.
i got those three (iptables, DG and Squid) installed on my linux and working successfully as an internet filter. so this is the output:

DG:
dansguardian (pid 3561 3560 3559 3558 3557 3556 3473 3472 3471 3470 3469 3468 2508 2503 2502 2501 2500 2499 2498 2497 2496 2495 2494) is running...

Squid:
squid (pid 2456 2454) is running...

iptables:
Table: filter
Chain INPUT (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- 0.0.0.0/0 0.0.0.0/0

Chain FORWARD (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- 0.0.0.0/0 0.0.0.0/0

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Chain RH-Firewall-1-INPUT (2 references)
target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmp type 255
ACCEPT esp -- 0.0.0.0/0 0.0.0.0/0
ACCEPT ah -- 0.0.0.0/0 0.0.0.0/0
ACCEPT udp -- 0.0.0.0/0 224.0.0.251 udp dpt:5353
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:631
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:80
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:21
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:25
REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Table: nat
Chain PREROUTING (policy ACCEPT)
target prot opt source destination

Chain POSTROUTING (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 OWNER UID match 23
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:3128 OWNER UID match 23
REDIRECT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 redir ports 8080
REDIRECT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:3128 redir ports 8080

for the /etc/dansguardian/dansguardian.conf :
all same except for proxyip : 127.0.0.1 (squid listen to this)

thats's all.....
p/s: for now on let me try the configuration you've mention...tq
 
Old 03-30-2006, 10:34 PM   #12
cryonics
LQ Newbie
 
Registered: Mar 2006
Posts: 12

Original Poster
Rep: Reputation: 0
still don't work!!

i just try the configuration that tou'd mention but.... still i can't browse the internet from XP. i just don't understand the command below :

next you need to make sure that your squid.conf looks something like this

http_port 192.168.0.254:3128
http_port 127.0.0.1:3128


and then what about the configuration below that u mention?

then set you browser on XP to use the following proxy settings

proxy 192.168.0.254
port 8080


what should i put to the proxy?

and what about my setting that i mention in the previous post......have any problem??
 
Old 03-30-2006, 10:43 PM   #13
paul_mat
Member
 
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855

Rep: Reputation: 30
okay, firstly you need to edit your /etc/squid/squid.conf file

nano /etc/squid/squid.conf

read through the file and look for

#http_port

or something like that should be the default

change it to

http_port the-ip-address-of-your-squid-machine:3128
http_port 127.0.0.1:3128

next, in XP, go to control panel, internet options, choose the connections tab, select 'lan settings' and then input your proxy address and proxy port

whatever the ip address of your squid server is and whatever port dansguradian is running on.
 
Old 03-31-2006, 03:22 AM   #14
cryonics
LQ Newbie
 
Registered: Mar 2006
Posts: 12

Original Poster
Rep: Reputation: 0


what do you mean by this??

http_port the-ip-address-of-your-squid-machine:3128
http_port 127.0.0.1:3128


how i want to know the ip address of squid machine?
according to what i'd read before, the squid use 127.0.0.1

i thought that the main problem is interconnecting (routing) from eth0(linux to internet) to eth1(linux to XP)!! so....anyone know about this??
 
Old 03-31-2006, 07:14 AM   #15
paul_mat
Member
 
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855

Rep: Reputation: 30
in the command line of your squid server type

ifconfig

that should give you a list of all your NIC's and ip addresses

what is the ip address of your squid machine?

lets just say it's 192.168.0.1

now open up your squid.conf file using nano or vi

in the command line type

nano /etc/squid/squid.conf

vi /etc/squid/squid.conf

add the following information into the text

http_port 192.168.0.1:3128
http_port 127.0.0.1:3128

i'm running out of ways to say this so i really hope you under stand that.

as for routing install webmin, it's very easy to install, download it from www.webmin.com and then unzip ot

gzip -d webmin.tar.gz
tar -xvf webmin.tar

cd webmin

sh setup.sh

following the prompts

then go to

http://ip-address-of-your-squid-machine:10000

and go to the networking title and something in there i can't access my webmin from were i am, but there should be a tick box around there that will allow routing

Last edited by paul_mat; 03-31-2006 at 07:17 AM.
 
  


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
Setup PPPOE Server on Linux and let the client over a cross cable. Deepti_s Linux - Networking 4 07-12-2013 01:44 PM
WinXP home client sees Linux Samba server but no access to shares IslanderTexas Linux - Software 27 02-22-2006 05:54 PM
PPTP on Ubuntu Server - Client WinXP Eleven77 Linux - Networking 4 11-06-2005 04:00 PM
How to setup a solaris NIS client while with a Linux NIS server? ntcm Linux - Security 2 03-31-2004 01:43 PM
Internet, WinXP-Server Linux-Client LoneWolf58 Linux - Networking 4 09-12-2002 10:11 AM

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

All times are GMT -5. The time now is 02:49 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
Open Source Consulting | Domain Registration