LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-26-2012, 04:04 PM   #16
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415

Quote:
Originally Posted by suicidaleggroll View Post
That is incorrect. I think you're hung up on setups with multiple public, static IPs and using NAT to assign each one to a local machine...with a single external IP and an internal network you need to set things up completely differently. You assign the public IP to the router itself, and then use port forwarding to direct incoming connections to the various machines on the local network.

kindofabuzz is correct; turn off NAT, and set up port forwarding. I'm sure the router can do it, I've never found one that can't.
How is that possible if the IP is dynamic and changing? I disagree with this but I have been wrong before. If you can give some resources to explain this it would be appreciated as it goes against everything I know and have been taught.
 
Old 06-26-2012, 04:10 PM   #17
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Quote:
Originally Posted by Kustom42 View Post
How is that possible if the IP is dynamic and changing? I disagree with this but I have been wrong before. If you can give some resources to explain this it would be appreciated as it goes against everything I know and have been taught.
The changing IP makes no difference. Incoming connections are directed to the router itself, the router has the public IP. It's then up to the router to decide what to do with the incoming connections. The most common scenario is to use port forwarding to selectively send incoming connections to various local machines based on the port, or filter them out with the firewall.

The only effect that a dynamic IP has is that you need to remember to connect to a different IP whenever it changes, and you might need to reboot the router whenever the IP changes on the modem (most ISPs in my experience only change the IP after you cycle power, which probably will only happen after a power outage, in which case the router is being power cycled anyway).

My home setup has a single dynamic IP with port forwarding set up. Incoming connections on port 45631, 3389, and 14081 are directed to one machine (air video server, remote desktop, and torrent), incoming connections on port 21, 22, and 80 are directed to a different machine (ssh, ftp, http), and incoming connections on another port are directed to a networked webcam.

The individual machines need to have static IPs on the local network, but the changing public IP isn't a problem.

Last edited by suicidaleggroll; 06-26-2012 at 04:11 PM.
 
2 members found this post helpful.
Old 06-26-2012, 04:23 PM   #18
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
That makes sense. I am remembering a little bit now back when I had to setup port forwarding for some gaming I did a long time ago, I don't think I have done anything with port forwarding since and have only used NAT.

I stand corrected; thanks for that explanation suicidaleggroll
 
1 members found this post helpful.
Old 06-26-2012, 05:39 PM   #19
Enrix
Member
 
Registered: Mar 2012
Location: Aguascalientes, mx
Distribution: Opensuse 12.1 x86-64
Posts: 34

Rep: Reputation: 1
Hello,

When you connect to the server, you should give the router's ip. and then, in the router, you should create a rule that the incoming connections in port 80 should be redirected to machine X (i dunno the way for your router, in mine, it's the internal IP. with this configuration, no matter if you have a dynamic IP from your ISP.
 
1 members found this post helpful.
Old 06-26-2012, 06:17 PM   #20
doubtingthomas
LQ Newbie
 
Registered: Jun 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Kustom42 View Post
Within your router you should be able to set a static IP to translate to internal. Most routers are using Cisco firmware or something proprietary but is very similar. A NAT rule is pretty simple, it tells your router/firewall that IP 1.1.1.1 translates to 10.0.0.1 and 2.2.2.2 translates to 10.0.0.2. Without a static IP you won't be able to set these rules as it will change.
yep... that just might be what causes this mess... many thanks;
as it turns out my ISP (from which i got the router from) has altered the firmware to its own version (branded the thing). this version doesnt have a "Port forwarding" option or the option to chane NAT to open (rather than "strict", im clue-less as to the differences). the isp in return has a web page that allows me to forward ports but not set any ip translation. howerver even-though i forwarded port 80 to 10.0.0.3 from the web-interface, theres no change in result.

my routers log has the following entry:
Firewall: packet accept. 10.0.0.3(52358) --> 173.213.109.225(80), Protocol TCP.
the second IP being the proxy im using.
any idea what is this strange 52358 port?

anyway, i hope tomorrow i could go and change my router to something that hasnt been branded.
 
Old 06-26-2012, 06:31 PM   #21
doubtingthomas
LQ Newbie
 
Registered: Jun 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
disable NAT forwarding on your router.
disabling NAT makes all devices on the network not being able to access the internet

Quote:
Hello,

When you connect to the server, you should give the router's ip. and then, in the router, you should create a rule that the incoming connections in port 80 should be redirected to machine X (i dunno the way for your router, in mine, it's the internal IP. with this configuration, no matter if you have a dynamic IP from your ISP.
isnt that what i already did with forwarding port 80 to 10.0.0.3 (my computer)?
 
  


Reply



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
Accessing Apache/HTTPD in Linux Home Network KinnowGrower Linux - Server 9 02-09-2010 09:19 AM
SELinux issue. (httpd & samba accessing same files and directories) vinten Linux - Security 2 01-08-2009 10:40 AM
httpd server behind router failing to respond to requests daiyu Linux - Networking 9 06-11-2006 08:51 AM
Accessing via Linksys router psycoperl Linux - Networking 0 09-18-2004 06:43 PM
Apache httpd/RP114 router problems DummyBot Linux - Networking 2 01-20-2004 03:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:10 AM.

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