LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 07-22-2009, 06:24 AM   #1
abduljabbar_11
LQ Newbie
 
Registered: Mar 2008
Posts: 5

Rep: Reputation: 0
Unhappy Setting up private and public ip on same machine.


Hi,

We have a ftp server which is running on public ip and out side of firewall.
Users out side of our network and users of our local network both using the same public ip and doing upload and downloading.
Last few days we are facing bandwidth problem as internal network users increased.

We want setup ftp server with 2 ips as follows.

Internal users will use private IP
users out side network will use public Ip.

Is there any procedure available to configure same machine with private and public ips.

please help me sort out this issue.:

Thanks in advance.
 
Old 07-22-2009, 07:04 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Yes, either with 2 NICs or a second virtual IP address on the same NIC, but you shouldn't need to do this. The traffic from the LAN should be routed to your FTP server and not go out on the internet, except maybe for DNS traffic.

Last edited by jschiwal; 07-22-2009 at 07:05 AM.
 
Old 07-22-2009, 11:20 PM   #3
abduljabbar_11
LQ Newbie
 
Registered: Mar 2008
Posts: 5

Original Poster
Rep: Reputation: 0
We have 2 nics in ftp server.If we assign private and public ip to each nic;then where should i put my ftp server that means behind firewall or out side of the firewall.
pls suggest me.
 
Old 07-24-2009, 06:26 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The ftp server should be in the DMZ. The computer or device with the two interfaces should be the firewall between the DMZ and the LAN.
The route table in the DMZ/LAN firewall will route LAN users to the FTP server. If you don't have a firewall between the DMZ zone and the internet, then you could have a second NIC for the internet connection.
 
Old 07-27-2009, 03:21 AM   #5
abduljabbar_11
LQ Newbie
 
Registered: Mar 2008
Posts: 5

Original Poster
Rep: Reputation: 0
We already have ftp server connected in DMZ which is having public ip assigned to one of its NIC to access internet.
If i give local lan ip (private ip) to another NIC,can local LAN people can access it by using private ip.
I want to setup local LAN users should do ftp by using private ip and internet users should do ftp using public ip.
is it possible.pls suggest me.

Thanks
 
Old 07-27-2009, 09:46 PM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The firewall/router between the FTP server and the LAN can connect to the public interface. If you don't have the ftp server between two firewalls, then you could use a second NIC on the FTP server, and have an outside zone and dmz zone. The SuSE's firewall is configured like that. You indicate which zone a device belongs to (outer, inner or DMZ) and have different firewall rules for each zone. The FTP server should be locked down with it's own firewall in any case.

Ideally the FTP server is located between two firewalls. The DMZ would have a private IP network address, but different from the LAN private address. The part you may be missing is that the firewall/router between the DMZ and the LAN will route the traffic from the LAN hosts to the FTP server. The FTP server doesn't need a NIC with a LAN network address.

If you have a DNS for your LAN, then it could provide the IP address of your FTP server (the DMZ IP address) and your ISP's DNS server wouldn't be consulted. Alternative, if you don't have a DNS server is to include the FTP server in every hosts /etc/hosts file. For small sized networks, the dnsmasq service looks very interesting. It uses it's own /etc/hosts file to serve up the IP addresses of hosts on the LAN, and relays requests for internet domains to a real DNS server.

So your LAN users would be using your FTP server's domain name (or nickname), which would resolve to a DMZ IP address, while Internet users would use the FTP servers FQDN (fully qualified domain name) and use the Internet IP address to your router/firewall.
 
  


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
public, private, protected...?(C++) name_in_use450 Programming 6 10-07-2008 11:43 PM
Public and Private Keys??? ajeetraina Linux - Server 2 05-10-2008 02:15 PM
public and private network here2serve Linux - Distributions 7 12-03-2006 12:34 AM
public vs private ip emailssent Linux - Networking 2 09-28-2004 02:11 AM
Linking Public IP to a Private IP Saints Linux - Networking 0 05-04-2004 04:33 AM

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

All times are GMT -5. The time now is 02:33 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