Linux - NetworkingThis 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.
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.
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 :/
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?
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??
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!
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)
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.