LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-17-2005, 10:54 PM   #1
lakmilis
LQ Newbie
 
Registered: May 2005
Distribution: mandrake
Posts: 8

Rep: Reputation: 1
network problems apparently noobie


Right, I am not sure if this is the right place but here goes :

I have read up loads of stuff but it keeps to be slightly contradicting to each other, so I will simply state what I have, what I desire, what problems I have, and what answers I hope to receive.

I have a desktop with dual OS (win xp pro / linux mdr 10.1). This desktop has 2 NIC, one which I use with a crossover cable to an ADSL modem (eth0, the modem gives me a dynamic ip address). The other NIC, eth1 I use to a switch and is part of an internal network with 2 clients (one single win xp but this one I disregard), and a laptop with a single NIC, dual OS win xp /linux mdr 10.1.

Now, What I have been doing is using both static and DHCP solutions for both NICs on the server (the desktop box which I wish to use Internet connection sharing [ICS] and gateway).

So I wish to lets say, since the network is small, use static ip's for the internal network (I set up DHCP). Now so far I have been a bit confused on where to configure a gateway address.

Ok, now, should I do lets say on desktop server :

eth0 : static 192.168.0.1 (gateway)
eth1 : static 192.168.x(0 or 1 lets say?).2+ hostname : hermes
(specify on this setup that the gateway is 192.168.0.1?)

client static : 192.168.0/1?.3 hostname : mina

Ok, the problems I've run into is how to configure the eth0 on the server. If its static, or dhcp or none, I still can connect to internet as long as ppp0 is specified to use eth0, also when running it as dhcp n running the daemon for this, the network does indeed distribute ips to eth1 and the client mina, but I can never ping the desktop itself (neither from itself nor laptop, regardless if i use hostname, localhost, or ips on eth1/0). Is this because of I am in linux secure mode so that ssh and ping etc is disabled?
(When I try to ssh into localhost or so, the connection is always refused).

Or is it simply because I have not set up iptables correctly to allow traffic to proceed properly? I can ping the client both on itself and from server, the client runs on linux (not secure boot).

The result is I can't share on the network, I can't ping the server, and I can't share the internet. Can someone pleaseeee help me with this problem because everything I do seems to fail. Given my local dhcp is working and I have my ISP's nameserver I think it perhaps is the iptables I have not yet specified properly. But this leaves me with the confusing fact I can not ping my own machine from the server!

Basically I have played around with every necessary thing, and it seems ot work in a way, but the net result is I dont really have a network apart from the client able to ping itself and occasionally the server, and that the ip is given from the dhcp if thats the method I tried...no network in real life though :/

Thanks for any replies or help.

Mike
 
Old 05-18-2005, 12:34 AM   #2
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
to keep this simple

if u are able to run internet from 1 NIC then u need to share that

for that

enable IP masquerading for ur network using iptables
and enable ip forwarding and then u need to specify the default gateway as ur ppp0 NIC

and i do not think u wil need more than this

also if uwant to simplify IPtables use an Intercae
shorewall is one which cna do iptables work for u

regards
 
Old 05-18-2005, 12:54 PM   #3
lakmilis
LQ Newbie
 
Registered: May 2005
Distribution: mandrake
Posts: 8

Original Poster
Rep: Reputation: 1
a bit mistyping like I do myself there; makes me slightly confused on some stuff but ok.

So how come my server can't ping itself (just stalls)?

But if I do this you say, then I must apply some routing rules into iptables, sure, I can do that, but instead I should run shorewall?

-> Ok, I will give that a try...

Hmmm, so setting ppp0 as gateway, ok, how do I do that then ? (I don't think I can specify ip on it!

Mike
 
Old 05-18-2005, 12:55 PM   #4
lakmilis
LQ Newbie
 
Registered: May 2005
Distribution: mandrake
Posts: 8

Original Poster
Rep: Reputation: 1
Oh and by the way, all you said, I have done, it still hangs, cos the server can't ping itself, nor can the other clients, and thus, no network (even if the ip forwarding aka dhcp works, you see?
 
Old 05-20-2005, 04:59 AM   #5
lakmilis
LQ Newbie
 
Registered: May 2005
Distribution: mandrake
Posts: 8

Original Poster
Rep: Reputation: 1
Well ok, i have enabled the masquerading before, but I have always had the problem with the ICS and pining master/server.

But when you mentioned default gateway, this is a crucial question for me. WHat is it?

My ADSL modem gives me a dynamic ip every time I connect, so I can't specify a default ip.

Hence, shall I used dhcp on eth0 (which ppp+ uses), or will the ip of eth0 on my side of the modem be the default ip? So if I set it to a static value, I can now specify ip oif eth0 as default gateway on the Local network through eth1??


Thanks for any replies

MIke

 
Old 05-20-2005, 07:13 AM   #6
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
dyanmic ppp0--------static ip eth0----------static eth1

in the network settings file of the eth1
ur default gateway should be
eth0 for eth1
and
ppp0 for all on eth0 machine

also u need to spcify the nameserver in both ,whic will be a fixed ip of ur ISP

regards
 
Old 05-20-2005, 11:04 AM   #7
lakmilis
LQ Newbie
 
Registered: May 2005
Distribution: mandrake
Posts: 8

Original Poster
Rep: Reputation: 1
ok thanks, will dig into it now

Ye, the problem I htink I tried that but at least knowing how that setup will be, I can perform proper iptable setup. The question is how to get the server machine to ping itself!
 
Old 05-20-2005, 12:46 PM   #8
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
server machine ping iteslf??

what problems are u facing there??

regards
 
Old 05-21-2005, 08:46 AM   #9
lakmilis
LQ Newbie
 
Registered: May 2005
Distribution: mandrake
Posts: 8

Original Poster
Rep: Reputation: 1
Ok, not sure masand....it could maybe be squid.

Anyway, it did indeed turn out I had the network up even if the server can't be pinged neither form itself or from clients (including lo from itself :/).

The minute I added the correct rules in iptables, the brwoswer gave itself away on the client to be working but denied from server squid daemon.

So have been playing with squid, as I can't let WAN access my webserver (I don't *think* port 80 is blocked because half a year ago I had a apache on windows running on this ADSL account).

Anyhow, the way I solved it was what you meant although ppp0 can't be specified as gateway.

Solution :

Server box :

eth0 -> ppp0 (I did NOT configure a LAN on this this time around).

eth1 -> static 192.168.1.1 (didnt set any gateway I think)

clients : static 192.168.1.x++, gateway 192.168.1.1

iptables : bla bla , accept routing etc.

now I think I need to add some routes perhaps to get the server to ping itself. To be honest if the server doesn't ping itself I do NOT consider this network fully functional and so am still in set up mode :/

squid : was next, for now I did the *bad* thing of setting in conf : http_access all allow (today I will reconfigure that)
just to make sure client could access internet.


Now,. the next step is that both client and desktop run dual OS linux/xp, the server remains a server on win xp pro, but I am not sure if I should give thebox same ip when running windows, nor hostname. A 2nd client downstairs will be running as a windows client ....

The whole problem with this network I thought was precisely because in windows xp I have always when trying to set up ICS, ended with the server not able to ping the client, else all can ping, and I could share folders only one way, from one comp to another not botrh ways,. and ICS never working.

Well, thats how all is so far.

I been stupid enough to not log properly all that happens, cos I should write an install_conf script which would set up new servers or clients with cvarious settings like static/dhcp settings, depending on # of NICs detected and if args include a server or client but when I can't even do this, I am not going to do that :x

Mike
 
  


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
libwine.so.1 is apparently missing? alpha2zero Fedora 1 09-10-2005 02:57 PM
chmod apparently not working Noido Linux - Software 2 06-29-2005 01:32 PM
apparently unique dual boot problems quztyne Linux - Newbie 4 07-14-2004 08:19 PM
Big Time Problems Please Help, Im Not A Noobie SlackinMonkeee Slackware 21 12-23-2003 06:50 AM
apparently useless download salparadise Linux - Newbie 8 12-20-2002 01:46 PM

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

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