LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 10-10-2011, 02:22 AM   #1
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
NAT and iptables issue


Hello everyone

My version of linux is RHEL 5.2

I have successfully configured ftp server on my machine
which is on

ftp://192.168.0.233

Now I want to use this ftp server outside my network from my house connection

My ISP address is something like 110.234.XX.XX

Please help me I am new with NAT and iptables in linux and let me know if there is any extra information which I need to provide.
 
Old 10-10-2011, 03:04 AM   #2
kerrylinux
LQ Newbie
 
Registered: May 2009
Location: Co. Kerry, Ireland
Distribution: CentOS, Fedora, RedHat, Ubuntu Enterprise Cloud
Posts: 12

Rep: Reputation: Disabled
If you wish to use your ftp server from outside your local network you will need to set up port forwarding in your router that conects your local network to the internet. I think this has nothing to do with iptables on your linux machine, because your IP address (192.168.0.233) is a private network address. Packets to and from that machine will never be routed directly within the internet. On the other hand your router is part of the internet and has a public IP 110.234.XX.XX, so you have to configure your router to forward ports 20 and 21 which are used for the ftp service to your local IP 192.168.0.233. If any machine on your local network is able to use your ftp server, then after the port forwarding, your server should be OPEN to the world.

At that point it is advisable to learn about securing your ftp server.
 
Old 10-10-2011, 03:10 AM   #3
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195

Original Poster
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
Thanks for the reply


So what is the meaning of IP Forwarding which is in

Code:
/etc/sysctl.conf
and what is NAT?

I tried google but still I have lots of confusion
can you please give me some basic idea or any link where I can get some knowledge on NAT, IP forwarding and network related issues
 
Old 10-10-2011, 07:32 AM   #4
kerrylinux
LQ Newbie
 
Registered: May 2009
Location: Co. Kerry, Ireland
Distribution: CentOS, Fedora, RedHat, Ubuntu Enterprise Cloud
Posts: 12

Rep: Reputation: Disabled
Please read carefully. You need to enable port forwarding in your router, not your linux machine.

A router is the little box you use for internet access. You usually log into it from the LAN using a browser and a password.
Then you'll have to make sure that all packets that arrive at the router (from the internet) are forwarded to the machine where your ftp server is running.
 
Old 10-10-2011, 07:49 AM   #5
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195

Original Poster
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
I understood what you are trying to explain


Im asking you a different question


Quote:
can you please give me some basic idea or any link where I can get some knowledge on NAT, IP forwarding and network related issues
 
Old 10-10-2011, 08:57 AM   #6
hen770
Member
 
Registered: Oct 2010
Distribution: Arch
Posts: 136

Rep: Reputation: 7
NAT - is like a gate from your home computers to the internet, basicly you pay to you ISP for a one IP address that they give you in order for you to surf the internet, but you are able to surf the internet from mulipile computers using just one IP address, and that is what NAT does.

In regard to your problem with the ftp server, maybe you should make changes to you xinetd or inetd server on you red had box, but i will left that for the experts of red had outhere.
 
Old 10-11-2011, 12:07 AM   #7
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195

Original Poster
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
Thanx

and do you know any website where I can get a good info on linux Networking
 
Old 10-11-2011, 03:03 AM   #8
Skaperen
Senior Member
 
Registered: May 2009
Location: WV, USA
Distribution: Xubuntu, Slackware, Amazon Linux
Posts: 1,905
Blog Entries: 20

Rep: Reputation: 126Reputation: 126
Quote:
Originally Posted by deep27ak View Post
Thanx

and do you know any website where I can get a good info on linux Networking
Google found a few HOWTOs on the subject ... that are 10 or more years old. I'd think Google would bring a newer one, if any, up to the top of the list. So my opinion is we need a new one.
 
Old 10-11-2011, 03:54 AM   #9
Lexus45
Member
 
Registered: Jan 2010
Distribution: Debian, Centos, Ubuntu, Slackware
Posts: 361
Blog Entries: 3

Rep: Reputation: 48
http://www.slackbook.org/html/securi...-HOST-IPTABLES
at the end of the chapter you'll find the most basic rules to set up NAT (masquerading in fact, it's a little bit different)
 
Old 10-11-2011, 04:28 AM   #10
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678
The www.tldp.org (The Linux Documentation Project) has a number of guides and howto's. One is the O'Reilly book Network Administrator's Guide.
 
  


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
iptables nat prerouting redirect issue - rhel 5.5 64-bit wischad Linux - Networking 1 11-12-2010 09:29 AM
iptables: can't initialize iptables table `NAT' linuxgentoo Linux - Kernel 3 01-17-2010 11:15 AM
IPTABLES : build NAT using IPTABLES joseph Linux - Networking 4 04-23-2004 06:08 AM
iptables NAT issue. onina Linux - Networking 1 02-26-2003 05:58 AM
IPtables +NAT daromer Linux - Networking 1 01-07-2002 12:15 PM

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

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