Re: binding IPs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Monday 2007-06-04 21:02:46 LC wrote:
Hi List,

How do you bind an external IP and an internal IP to a fedora box? Is it
possible?


what exactly do you need? 2 IPs on one interface?
If so, you can do this (at least that's what I do):
# cd /etc/sysconfig/network-scripts
# cp eth0 eth0:1
edit eth0:1 to something like this:
--- cut ---
DEVICE=eth0:1
ONBOOT=yes
NETWORK=192.168.1.0
IPADDR=192.168.1.1
BROADCAST=192.168.1.255
NETMASK=255.255.255.0
NOZEROCONF=yes
--- cut ---
This is if eth0 is configured with static IP (can't have dhcp and ip
aliases). After this
# ./ifup-aliases eth0
and that's it.

If you want to make it a router/firewall it's better (more, it's a
must) to have two network cards - one with real IP and one with local.

Thanks. This box is a samba machine. I want to allow local users and remote users to access it. I have 2 NIC on this box. eth0 is on a public IP(12.73.1.5) and eth1 is on the local IP(192.168.1.5). But how do i set the gateway? Can i specify the public gateway for eth0(12.73.1.1) and the gateway for eth1 (192.168.1.1) and as for the gateway in /etc/sysconfig/network i will remove it. Will this work?

nb: above IPs are example. They are not my real IPs

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux