Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 1st December 2008, 03:14 PM
InfRecursion Offline
Registered User
 
Join Date: Jan 2005
Posts: 214
Router/Modem has taken static IP from my Apache server.

I recently purchased a Netgear Wireless-N router with a built-in DSL modem (model DGN2000). It seems like the web interface took control of my static IP address. I run an Apache server on one of my Fedora boxes and I have port 80 and a few others forwarded to that box. From outside of the network I can get to my website, but from the inside I have to specific the internal IP address, not my domain name.

Is there any way I can have my static IP address be assigned to the Fedora box and not to the router/modem? I don't connect to the web interface often, but connect to my Apache box daily... much rather have it be the box where the static IP address is allocated.

Any suggestions?
Reply With Quote
  #2  
Old 1st December 2008, 06:49 PM
wt6g's Avatar
wt6g Offline
Registered User
 
Join Date: Jun 2005
Posts: 176
This depends on your router. If it can operate as a "gateway" and pass traffic through then this is possible and you can give your fedora box a routable ip address.

This is how a lot of people running netopia routers on T1 lines do exactly what you are talking about.

I don't recall ever seeing a netgear router that had a gateway mode, and doing it requires at lease a small segment, not just one address. I think it would take 4 addresses minium, and your ISP would have to know that you were running in a gateway mode. But yes, there is a way.

It sounds like your problem is you want to be able to say http::www.myhost.com from inside and outside your network and go to the same apache server. This can be done another way. First, the public address outside is pretty normal, and you've got it working. Inside your network you just need to make a translation to show that on your LAN www.myhost.com has a different IP than it does from the Internet. The easiest way is to make an entry in the /etc/hosts file that tells your local machine something like this:

myhost.com 10.10.10.14

*you may need to make that www.myhost.com

Now when you try to go to myhost.com your browser will not go to DNS to get the address, it will get it locally from the hosts file. This is ok for a desktop machine on your LAN but laptops are a different story because they might be inside or outside the LAN.

This means you need a more complicated fix. A simple one would be to write a script to change the hosts file. A robust solution would be to install your own DNS server on your LAN and then let it intercept DNS calls trying to lookup myhost.com and send you the local address.

With a DNS server the laptop and all machines on the LAN will automatically get the correct address from the LAN side when they are on the LAN with no modifications to their configuration or hosts file.

The problem is that setting up a DNS server will take a bit of study. I suggest using a program called Webmin if you decide to go this route.

There are two other things that might work without resorting to running DNS locally.

One is using static routes in the netgear box, and the other is using a routiing protocol (RIP). Years ago I spent some time doing it this way but ultimately I went to a private DNS. Either way its a lot of work for a simple problem.

The most elegant solution is to make your Apache box a router as well as a webserver and build the firewall/configuration with FWBuilder.

With FWBuilder you can intercept traffic heading for your static ip address and send it to apache on the local machine by changing its destination using iptables. This is incredibly flexible and learning how to do this is probably going to help you in other areas in the future. That would be my recommendation because its cheap, it will work, once you learn to use FWBuilder its easy to do, easy to document, and easy to figure out what you did 2 years later, and you can do hundreds of other things with it.

Have fun!
__________________
Len Umina
El Dorado Hills, CA
WT6G
Reply With Quote
Reply

Tags
apache, router or modem, server, static

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need advice on /etc/hosts for static ISP IP, router, LAN, static LAN IP rshartog Servers & Networking 2 21st February 2009 05:24 AM
Static ip and bridged modem ISP claybv Servers & Networking 1 19th March 2008 03:06 AM
How to share home's web server over the Internet, I'm behind DSL/Cable Modem Router? kanenas.net Servers & Networking 23 30th April 2006 11:39 AM
Static router from NIC to NIC lovswr Servers & Networking 1 6th August 2005 07:47 PM
assigning static IP on linksys router for ftp server LackeyLad Servers & Networking 1 12th March 2005 03:39 AM


Current GMT-time: 20:01 (Thursday, 23-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat