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 29th August 2005, 12:48 PM
kenm_uk Offline
Registered User
 
Join Date: Jul 2005
Location: London
Posts: 86
Apache: can not view website via http://[WAN address] but can view from [LAN address]

Hi. I am relatively new to Linux. I have set up a basic website with Apache/PHP. I am able to view my website through http://[my LAN address] but not through http://[my WAN address].

I have rediredcted port 80 to my LAN ip address in my DSL router. I am running firestarter on my linux box and I have allowed inbound and outbound access on port 80. Further, if I go to a site like the-cloack.com I am able to view my website through thier service with the address http://[my WAN address].

Does anyone know why I am not able to view the page locally via http://[my WAN address] ?

Thanks,
Ken
Reply With Quote
  #2  
Old 29th August 2005, 01:35 PM
fsck Offline
Registered User
 
Join Date: May 2005
Location: London, UK
Posts: 704
I Imagine this problem has to do with IP addresses. Let me try to explain.
First we assume your local LAN ip address for the web server is 192.168.0.10, and the client web browser is 192.168.0.20
The we say the internet-facing ip address (WAN, as you call it) is 30.40.50.60.
Your router will know that one side of its network, the local side, is on the 192.168.0.x network, and the other side is on 30.40.50.x. Also, it will understand that 192.168.0.x is a private address range, sometimes incorrectly called un-routable, and should never be seen on the real internet.
Thus, when a packet from 192.168.0.20 reaches the router bound for 30.40.50.60 it is rejected by the interface holding the 30.40.50.60 address because it is not a valid address for the internet side of the device, only the local side.
NAT will have trouble solving this because it will have to NAT your address (192.168.0.20) to the outside address (30.40.50.60), and connect from 30.40.50.60 to 30.40.50.60 and get that connecton NATed to 192.168.0.10, which won't work on many devices because we are connecting to ourself from ourself, and many devices don't like that, again for good reasons.

The reason all this doesn't work is called "IP Spoofing". It's a set of rules which include:
1) I should never see a connection from the internet which originates from a private IP. Reject it if I do.
2) I should never see a connection from the internet which originates from my IP address. Reject it if I do.

There are several ways to get around this problem:
1) allow private IPs to route from the internet - bad idea
2) force your web browser to use a proxy server on the internet, so traffic comes from a valid external address (this is why the-cloak.com works) - good idea
3) if you have a domain which resolves to an external IP, try adding a local entry in the clients /etc/hosts/ to force clients to use the local address, like so:
Code:
172.16.3.130    fukka.co.uk
I personally use 3) because I only have a couple of local clients.

Hope that makes sense!

C.
__________________
Want to get better answers? Learn to ask better questions!
fukka.co.uk for spamassassin rules and random garbage.
Reply With Quote
  #3  
Old 29th August 2005, 10:15 PM
kenm_uk Offline
Registered User
 
Join Date: Jul 2005
Location: London
Posts: 86
fsck,

Thanks for your reply! I had a feeling that it was something to do with the router not being happy with the WAN ip address being requested from and sent to the same side but I could not find a conclusive answer on google. And thatnks for your three suggestions.

One quick follow-up: how would you implement your option 3 on a WinXP machine?

Thanks,
Ken
Reply With Quote
  #4  
Old 29th August 2005, 11:19 PM
fsck Offline
Registered User
 
Join Date: May 2005
Location: London, UK
Posts: 704
XP holds the host file in the same format as linux, in c:\windows\system32\drivers\etc\hosts(.txt?). Place the changes in there...
__________________
Want to get better answers? Learn to ask better questions!
fukka.co.uk for spamassassin rules and random garbage.
Reply With Quote
Reply

Tags
address, apache, http or or wan, lan, view, website

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
Font Problem when view website fengsha80 Using Fedora 5 29th September 2009 03:07 AM
View Website Internally (How To) Broady Servers & Networking 6 8th June 2007 09:22 AM
cant view image in some website gersonsia Using Fedora 1 15th February 2007 03:59 PM
how to set multiple website in a single IP address in APACHE in my FC4 xyleo Servers & Networking 5 26th April 2006 07:43 AM
Not Being Able to View Our Companys Website In Our Office CatAttack Using Fedora 1 17th November 2005 07:58 AM


Current GMT-time: 23:13 (Friday, 24-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