LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   NAT and iptables issue (https://www.linuxquestions.org/questions/linux-networking-3/nat-and-iptables-issue-907333/)

deep27ak 10-10-2011 01:22 AM

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.

kerrylinux 10-10-2011 02:04 AM

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.

deep27ak 10-10-2011 02:10 AM

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

kerrylinux 10-10-2011 06:32 AM

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.

deep27ak 10-10-2011 06:49 AM

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

hen770 10-10-2011 07:57 AM

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.

deep27ak 10-10-2011 11:07 PM

Thanx

and do you know any website where I can get a good info on linux Networking

Skaperen 10-11-2011 02:03 AM

Quote:

Originally Posted by deep27ak (Post 4495177)
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.

Lexus45 10-11-2011 02:54 AM

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)

jschiwal 10-11-2011 03:28 AM

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.


All times are GMT -5. The time now is 05:30 PM.