LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-28-2003, 08:43 AM   #1
ganninu
Member
 
Registered: Jul 2003
Distribution: RH 7.3/8.0/9.0, Debian Stable 3.0, FreeBSD 5.2, Solaris 8/9/10,HP-UX
Posts: 340

Rep: Reputation: 30
Accessing a local server with a public IP


I have a simple home network - an alcatel pro ADSL modem which is a router+NAT and is connected to 2 boxes - a webserver at 10.0.0.3 and a linuxbox at 10.0.0.4. For the guy on the linuxbox to access the webserver, he has to access it through 10.0.0.3. When the guy is outside the LAN he accesses the webserver through some public ip, say 222.222.222.222. Is there a way to access the server on the LAN by using the public ip? I was wondering whether there can exist a file which can map 222.222.222.222 to 10.0.0.3 in a simple way such that when the user on the LAN types http://222.222.222.222, he is directed to http://10.0.0.3 (I am making a fuss to reach it with the public ip since i need to test vertain programs on the LAN with a public ip for the server)

thanks a lot,
ganninu
 
Old 12-28-2003, 09:49 AM   #2
fatgod
Member
 
Registered: Mar 2002
Location: Edinburgh, Scotland
Distribution: Suse 7.2, Gentoo 1.4, Solaris 9
Posts: 661

Rep: Reputation: 30
I think I follow you... You have a router that both your machines connect to, and the router has the public ip address, you want to be able to access 10.0.0.3 via the routers public ip. Correct?

You just need to configure your router to route whatever ports you want to the local machine. so if you want access to the webserver on 10.0.0.3 then you can tell your router that all requests on port 80 should go to 10.0.0.3 so the guy out side would go to http://222.222.222.222/ and transparently he would be forwarded to 10.0.0.3 inside your lan.

I dont know how to achieve this on your router though, time to RTM unless someone else here has some alcatel router experience...
 
Old 12-28-2003, 10:04 AM   #3
ganninu
Member
 
Registered: Jul 2003
Distribution: RH 7.3/8.0/9.0, Debian Stable 3.0, FreeBSD 5.2, Solaris 8/9/10,HP-UX
Posts: 340

Original Poster
Rep: Reputation: 30
yes i have already configured that through NAT (guys can actually connect to me using the public IP). The problem is that me, myself, can only access my webserver on the same leg of the LAN through the private IP. Seems that the router does NAT for users trying to access the LAN from outside, but not for me who is on the inside.
 
Old 12-29-2003, 03:31 AM   #4
fatgod
Member
 
Registered: Mar 2002
Location: Edinburgh, Scotland
Distribution: Suse 7.2, Gentoo 1.4, Solaris 9
Posts: 661

Rep: Reputation: 30
oh! Your trying to access your webserver via the external interface from within the LAN? I dont know of a pratical way that can do that for you. Why do you want to do that? Surely access to the box is access to the box, no?
 
Old 12-29-2003, 03:38 AM   #5
ganninu
Member
 
Registered: Jul 2003
Distribution: RH 7.3/8.0/9.0, Debian Stable 3.0, FreeBSD 5.2, Solaris 8/9/10,HP-UX
Posts: 340

Original Poster
Rep: Reputation: 30
sometimes you need to test the access using the public IP But anyways, I thought it was only my network which was strange not to be accessed that way.
 
Old 12-29-2003, 04:07 AM   #6
fatgod
Member
 
Registered: Mar 2002
Location: Edinburgh, Scotland
Distribution: Suse 7.2, Gentoo 1.4, Solaris 9
Posts: 661

Rep: Reputation: 30
your router has two interfaces, an internal and an external, perhaps you can configure the internal interface to direct traffic detined for 222.222.222.222 to always translate to 10.0.0.3 - a sort of pseudo external connection.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Script for accessing public access points... L1nuxR0x Linux - Wireless Networking 2 04-23-2005 12:40 PM
Is it possible to use eth0 for both local and public network? DrunkGod Linux - Networking 7 03-08-2004 10:01 PM
proftpd: local=yes public=no snocked Linux - Software 1 02-13-2004 06:35 AM
Accessing my public ip. CurlyMo Linux - Networking 26 03-10-2003 12:45 PM
Accessing LOCAL FTP Server from Internal fails kofi Linux - Security 1 10-29-2002 01:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration