Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
Hello all, I am a newbie. I am building a web server for home use using an old machine I have and am putting web server software on it and am having a problem finding an inexpensive solution for a static ip. I am using dsl verizon and they frown on home use of static ip, but happy to provide me one if I take out a 2nd mortgage. Is there a way to trick the dsl modem into a static ip address or is there an inexpensive service out there. I am probably looking in the wrong places or not asking the right questions, any advice will be appreciated.
Assuming this box is behind a router, assign a static ip to this box, such as 192.168.0.40 - then set your router to redirect all port 80 calls to the .40 server.
You can use something like dyndns.com to easily "find" your box wherever you are.
Hostpc's trick is fine, but it will not give you a static real world IP. You would have to use a dynamic name service like dyndns.org/com to find your machine.
There is nothing you can do to force your provider to give you a static address. That is their choice, not yours. At the same time, I'm on a dynamic IP cable modem, and my address hasn't changed in the last 8 or so months. If you leave your router on all the time, odds are good you'd keep the same address for quite a while. That's not a guaranteed truth, just something I've seen from experience.
The dyndns client does that exactly. Your machine signs into their system with a username/pass, and the IP used by your connection gets logged and linked to an address, like yourname.dyndns.org.
Their service is free, and works well for having a home website on a dynamic address.
So you mean I go there I see several services, mail hop, http referer and 4 or 5 dns services, which free service are you referring to?
Quote:
The dyndns client does that exactly. Your machine signs into their system with a username/pass, and the IP used by your connection gets logged and linked to an address, like yourname.dyndns.org.
Does this also mean my web address would be whatever.TLD.com or in this case www.mywebserver.dyndns.com)
This would bring the next question of what hostpc said:
Quote:
assign a static ip to this box, such as 192.168.0.40 - then set your router to redirect all port 80 calls to the .40 server.
I haven't obtained any new hardware yet, should I be compiling a list of things that you may recommend I don't want to get to a shoulda, woulda, coulda phase.
Does this also mean my web address would be whatever.TLD.com or in this case www.mywebserver.dyndns.com)
I do mean that, although your use of TLD is incorrect. A simple "domain" would have been better. TLD stands for Top Level Domain, which are the things like .com, .net, .org etc. Dyndns.com is a domain, and you would be subdomain.domain.com.
You will have to assign a local static IP to your linux machine holding the website. There are dozens of ways to do that (static defined on the server, static assigned by the DHCP device by fixing the MAC of the server to a given address). There are also many different ways of setting up the network. You could do it with just a router forwarding port 80 to the linux server, but I would suggest getting a firewall in place as well. That can be a simple software firewall (IPtables) run on the linux machine, or you could setup an old machine as a smoothwall firewall (distro designed to be a simple-to-use firewall) or get a low end hardware firewall, or a great hardware firewall (Cisco Pix or better). Which one is right? Any or none of them. You do want to protect your server, so something needs to do that, but you do need less protection if you're only serving non-interactive data, and you do need more if you run php and still more if you have a database. Every additional piece of your website is also a security risk to some level, so plan accordingly.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.