Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-22-2006, 02:57 AM
|
#1
|
LQ Newbie
Registered: Mar 2006
Posts: 12
Rep:
|
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??
|
|
|
03-22-2006, 03:14 AM
|
#2
|
Member
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855
Rep:
|
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.
|
|
|
03-22-2006, 11:54 PM
|
#3
|
LQ Newbie
Registered: Mar 2006
Posts: 12
Original Poster
Rep:
|
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
|
|
|
03-23-2006, 12:23 AM
|
#4
|
Member
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855
Rep:
|
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
|
|
|
03-28-2006, 10:00 PM
|
#5
|
LQ Newbie
Registered: Mar 2006
Posts: 12
Original Poster
Rep:
|
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?? 
|
|
|
03-28-2006, 10:45 PM
|
#6
|
Member
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855
Rep:
|
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 ?
|
|
|
03-29-2006, 07:28 AM
|
#7
|
LQ Newbie
Registered: Mar 2006
Posts: 12
Original Poster
Rep:
|
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. 
|
|
|
03-29-2006, 05:53 PM
|
#8
|
Member
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855
Rep:
|
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
|
|
|
03-29-2006, 08:57 PM
|
#9
|
Member
Registered: Mar 2005
Posts: 60
Rep:
|
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 08:59 PM.
|
|
|
03-29-2006, 09:35 PM
|
#10
|
Member
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855
Rep:
|
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 09:38 PM.
|
|
|
03-29-2006, 11:43 PM
|
#11
|
LQ Newbie
Registered: Mar 2006
Posts: 12
Original Poster
Rep:
|
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
|
|
|
03-30-2006, 09:34 PM
|
#12
|
LQ Newbie
Registered: Mar 2006
Posts: 12
Original Poster
Rep:
|
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??
|
|
|
03-30-2006, 09:43 PM
|
#13
|
Member
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855
Rep:
|
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.
|
|
|
03-31-2006, 02:22 AM
|
#14
|
LQ Newbie
Registered: Mar 2006
Posts: 12
Original Poster
Rep:
|
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??
|
|
|
03-31-2006, 06:14 AM
|
#15
|
Member
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855
Rep:
|
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 06:17 AM.
|
|
|
All times are GMT -5. The time now is 01:43 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|