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.

I don't see how this will solve a bandwidth issue, but this is the answer to your question:

The 'ip' command will allow you to set multiple IP addresses on a single interface, whereas the 'ifconfig' command will replace an existing IP address with a specified new address.

So to add multiple address to an interface, use:

ip address add 192.168.1.1/24 dev eth0
ip address add 4.2.2.2/28 dev eth0

And don't forget to bring the link up:

ip link set eth0 up

To delete an IP address from the interface, replace "add" with "delete".