LinuxQuestions.org
Register a domain and help support LQ
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 10-02-2010, 06:24 PM   #1
omega151x
LQ Newbie
 
Registered: Sep 2010
Posts: 3

Rep: Reputation: 0
How do I setup Self Port Forwarding on Fedora 13 x64




How do I setup Self Port Forwarding on Fedora 13 x64

How Port Forwarding Works

Port forwarding allows access to a local area network by a remote user through forwarding ports that provide ftp access and web server access. The operating systems use a kernel or ipfirewall to carry out the port forwarding process.

There are several different ways that port forwarding is accomplished.

* Self Forwarding:
---------------
Self forwarding is port forwarding that is accomplished on a local area network that has multiple computers connected to the network. Since all of the computers share the same IP address, the port forwarding must be conducted within each computer on its own system. If the local area network router has a network access translator then the computers that are connected to the router must also do port forwarding within their own system.

* Unix System Port Forwarding:
---------------------------
Port forwarding can be accomplished with Unix systems however the port can only be accessed by the root administrator. This is a less common method of port forwarding due to the fact that using a root administrator poses risks to the system because the users will often take a detour to a higher port number to gain faster access to the server.

* Double Port Forwarding:
----------------------
Double port forwarding involves the use of multiple routers that join computers on a local area network. As a result, the ports on one router are forwarded to another router that acts as a gateway. The gateway router then forwards to a host on the local area network (LAN).

* Reverse Port Forwarding:
-----------------------
This type of port forwarding involves the communication of several components which include the session server, session client, and session port. When the user establishes a connection the session server will connect to one of the session ports that are to be forwarded which will in turn, forward the port to the session client. Reverse port forwarding is used when access is required to a port that is protected behind a firewall.

While port forwarding is convenient, there are a few things to be aware of when using this type of technology. If you use port forwarding only one port can be used at a time and the machine that is receiving the port forwarding can only view the information as coming from the router instead of the original machine. Additionally, port forwarding can open up network access to other machines that may be able to find the port forwarding by gaining unauthorized access.


I know how to setup port forwarding in my router along with Dyndns.org free ED, but my local area network has multiple computers connected to the network on my router. All of the computers share the same external (public) dynamic IP address; when I setup port forwarding only my Web Server can access the internet, so how do I setup Self Port Forwarding on Fedora 13 x64


Some of the Ports I want to forward
=======================
FTP TCP - 20,21
SSH TCP/UDP - 22
TelNet TCP - 23
SMTP TCP - 25
HTTP TCP - 80
HTTPs TCP - 443


Example: If I have 4 PCs with internal IP address
=================
192.xxx.xxx.1 <--------------------- My Router

192.xxx.xxx.2
192.xxx.xxx.3 <--------------- My Web Server static internal IP addresses set for NIC
192.xxx.xxx.4
192.xxx.xxx.5

http://www.whatismyip.com/
78.xxx.xxx.118 <------------------------- My external (public) dynamic IP address


How do I setup Self Port Forwarding on Fedora 13 x64


Thanks in advanced
 
Old 10-02-2010, 07:34 PM   #2
HasC
Member
 
Registered: Oct 2009
Location: South America - Paraguay
Distribution: Debian 5 - Slackware 13.1 - Arch - Some others linuxes/*BSDs through KVM and Xen
Posts: 329

Rep: Reputation: 55
I'm not sure if I understood your text...

What do you want to accomplish? You want your internal web server to be reachable from the Internet? That's port forwarding/DNAT. You want all your LAN hosts to be able to reach the Internet? That's masquerading/SNAT
 
Old 10-03-2010, 03:57 PM   #3
omega151x
LQ Newbie
 
Registered: Sep 2010
Posts: 3

Original Poster
Rep: Reputation: 0
I want to allow all PCs to connect to the internet while I enable port forward in my router for my Web Server; I know you can only Port Forward to one IP.

When I setup port forwarding with the ports listed below for my Web Server in my Router + Dyndns.org free; only my Web Server can access the internet.
---------------------------------
FTP TCP - 20,21
SSH TCP/UDP - 22
TelNet TCP - 23
SMTP TCP - 25
HTTP TCP - 80
HTTPs TCP - 443

I read somewhere you can setup Self Port Forwarding:
Self forwarding is port forwarding that is accomplished on a local area network that has multiple computers connected to the network. Since all of the computers share the same IP address, the port forwarding must be conducted within each computer on its own system.

I have seen port forwarding apps but I don't know how they work if your using a Router(note: this is for a home web server setup).

Last edited by omega151x; 10-03-2010 at 04:08 PM.
 
Old 10-03-2010, 04:09 PM   #4
rkski
Member
 
Registered: Jan 2009
Location: Canada
Distribution: CentOS 6.3, Fedora 17
Posts: 247

Rep: Reputation: 51
As the previous poster mentioned, what you want is masquerading.
 
Old 10-03-2010, 06:21 PM   #5
omega151x
LQ Newbie
 
Registered: Sep 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks HasC & rkski for setting me on the right track; I guest the site I got that info from about Self Port Forwarding was wrong.
 
  


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
Shorewall: port forwarding problem, port is closed even after forwarding Synt4x_3rr0r Linux - Networking 2 12-13-2009 05:36 PM
port forwarding and ssh key setup rasanth Linux - Networking 1 12-11-2008 03:55 AM
Fedora 9 Port forwarding albertvd Linux - Networking 1 12-02-2008 10:52 AM
FWBuilder + iptables + fedora -> port forwarding the_reen Linux - Security 2 09-04-2004 01:34 PM
Port forwarding with iptables on Fedora fychan Linux - Networking 3 04-13-2004 12:49 PM


All times are GMT -5. The time now is 09:35 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration