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.
Distribution: Mandrake 9.2 and a couple of RH7.3 Apache servers
Posts: 153
Rep:
I think that somebody much better with Linux need to chime in here and tell us how to see what the machine thinks the gateway is and how to set it. I'm leaning toward that being the root of your problem. I dont see the gateway if I do ifconfig on either of my machines either so its there somewhere and we just need to know how to see it. Is there a GUI tool that shows the gateway that you could use to set it up? All of your other settings look good. You should have
ip 192.168.1.100
mask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1
As far as an adressing sceme, I think everybody probably does it a little differently. The way I do it is that my router is 192.168.2.1 and I reserve 192.168.2.5 - 192.168.2.25 for servers, 192.168.2.26 - 192.168.2.75 for printers, and then set my dhcp pool to 192.168.2.100-200 . But basically you can do it however you want as long as you use the range between 192.168.x.1 and 192.168.x.254 . you cant use 255 because that is your broadcast address, so basically you have 255 IP's to play with on that subnet. Of course that is just for the 192.168 subnet, another popular one is the 10.10 subnet. those are both reserved for private networks so af one of those ips were to get live on the net it would just die. And you could also use 192.168.3.x or .4.x or whatever. I have 2 offices with a wan and I use 192.168.1.x in one location hten 192.168.2.x in the other so I can tell what is where.
And no I have no clue what an affero is, thought it was that key with the goofy squigle thing but Im now thinking Im wrong Clue me in.
Ok, in my /etc/rc.d/rc.inet1 (not home right now, and cannot ssh into my box, so this is from memory) there is an option to set Gateway. I really do believe I've used the router's IP before as my Gateway, but cannot remember for sure, so that will be the first thing I do tomorrow when I get home.
All 4 threads talk about it, here's a summary:
It's a place to go and let others know how much they've helped you. It can be used so other people can get a "grasp" on how good of a responder this person is, and whether or not they are just "trolls" giving bad info (such as: "To fix that just rm -rf / as root"). It's also a rating system. The main thing I use it for though is to publicly (besides in the thread) thank whomever has helped me. I think it's a great idea for that, and that's what I want to affero you for.
1.43, Sep 04 2002 check to see if your firmware is up to date if note mine is here and I use static lan ips and my fowarding works fine thru all the machines on my lan email me if you need help I have the same router.
Well I've updated my firmware, still no luck on transferring in, nor on setting up a static IP in anything except Mandrake! I love Mandrake, but I used the provided tools to set it up, so I don't really count that as a win. And still, the transferring in does not work, just the standard internet connection.
I don't even know what to try at this point as it seems I've tried everything, any suggestions at all are greatly appreciated.
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152
Rep:
Ok. Let's start from scratch. You've done a lot above, but some
of it may be confusing the issue. First, you need to make sure
you can access the outside world. You want your server to have
a static IP, so in /etc/rc.d/rc.inet1, you'll find the ethernet setup
stuff.
My router (same model) has an IP of 192.168.0.1, but I don't
remember if that was default or if I changed it.
For 192.168.1.X, set it up as follows:
Code:
IPADDR="192.168.1.2"
NETMASK="255.255.255.0"
USE_DHCP=no
GATEWAY=192.168.1.1 (IP of the router)
then you'll have to do:
Code:
ifconfig eth0 down
. /etc/rc.d/rc.inet1
Now, try connecting from your machine to the outside world.
If you can connect, we'll go to the next step. If you can't
connect, reenable DHCP (don't bother changing anything else),
re-run /etc/rc.d/rc.inet1, and let us know.
Next Step:
You want your router to pass information on to your server, so in
the router setup (Advanced):
Make sure nothing is filtered.
Set up your server either to be the DMZ host (dangerous, no
ports protected, but it WILL work -- just turn off any unused ports
on your server), or set up the forwarding so that it forwards to
your server. I'd suggest only enabling ftp and ssh. . .
You can't use both DMZ and port forwarding, since DMZ
basically takes the router's IP address and makes the DMZ host
have that IP (sort of).
Here's a screenshot of my router config:
Ok, here's what I did. I went into /etc/rc.d/rc.inet1 and edit the information in there as follows:
Code:
# Edit these values to set up your first Ethernet card (eth0):
IPADDR="192.168.1.50" # REPLACE with YOUR IP address!
NETMASK="255.255.255.0" # REPLACE with YOUR netmask!
# Or, uncomment the following lines to set up eth0 using DHCP:
#USE_DHCP=yes
# If your provider requires a DHCP hostname, uncomment and edit below:
#DHCP_HOSTNAME="CCHOSTNUM-A"
# Edit these values to set up your second Ethernet card (eth1),
# if you have one. Otherwise leave it configured to 127.0.0.1,
# or comment it out, and it will be ignored at boot.
IPADDR2="127.0.0.1" # REPLACE with YOUR IP address!
NETMASK2="255.255.255.0" # REPLACE with YOUR netmask!
# Or, uncomment the following lines to set up eth1 using DHCP:
#USE_DHCP2=yes
# If your provider requires a DHCP hostname, uncomment and edit below:
#DHCP_HOSTNAME2="CCHOSTNUM-A"
# Edit the next line to point to your gateway:
GATEWAY="192.168.1.1" # REPLACE with YOUR gateway!
Once I did that, I took down eth0 and ran /etc/rc.d/rc.inet1 and can still access the internet (will I still be able to after a reboot though? Also, in the DHCP tab on the server, should I enable DHCP?)
And I've gone into my router and unchecked every forward "enable" and set the DMZ to 192.168.1.50
So now I've just got to test it... Doesn't seem to work still (I had my mom try to FTP me ).
So now I am going to try Forwarding... Damn, still no luck apparently.
She says it's an immediate timeout (as if it's not even searching to connect), and the error message is (from IE): Server error, the client could not connect. Please contact the administrator. <update> I checked my DNS server and it's not up to date, so I changed it to my current IP. Now it's still giving the timeout, but after a longer time.
So then I tried having her connect to my WAN IP directly...
(my current IP) ftp://4.65.28.150 OR my DNS ftp://masterc.no-ip.org
But still, it doesn't give an immediate error message, but searches until a timeout.
I will post back with a bunch of screenshots of my settings on my router.
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152
Rep:
The whole point of putting this stuff in /etc/rc.d/rc.inet1 is so that it's
constant after reboot.
And you are sure your server is allowing those connections? Can
you connect from your server to your server? (ftp 192.168.1.50)
Can you connect to your server from your server (ftp 4.65.28.150)?
Ok, here are the shots:
To view them you may have to click the link, and then if it opens up a page cannot be displayed or something similar, then go to the URL bar and hit enter.
Or if that doesn't work, then highlight the URL (or copy link location) and paste into a new browser window...
I actually just tried em, I had to hit refresh a few times and copy link location, YMMV, I appologize for the incovenience. If I could host em myself (well if I could host em myself, I guess this thread wouldn't be here ) I would.
Originally posted by moses The whole point of putting this stuff in /etc/rc.d/rc.inet1 is so that it's
constant after reboot.
And you are sure your server is allowing those connections? Can
you connect from your server to your server? (ftp 192.168.1.50)
Can you connect to your server from your server (ftp 4.65.28.150)?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.