Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am running a Red Hat box as a router using iptables and we recently added 2 IP address for a total of 3. Is there anything I need to do for Linux to recognize these IPs other than porting them through iptables? Is there a way to assign more than a single IP to a network adapter. I assume you must.
Are you sure?
Inetd is for running services like ftp servers that listen on a port. Instead of having the server software loaded all the time using up memeory inetd starts it up only when it is needed.
I think you have to set up mulitiple ip in the lower level network stuff before messing with inetd.
ifconfig eth0:0 xxx.xxx.xxx.xxx is the format for a second IP which will resolve to the same NIC.
ifconfig eth0:1 etc etc
These are not retained through a boot up though. To make them persistant, you need to create a file with the setup.
On Red Hat, cd to /etc/sysconfig/network-scripts. There you will see the configuration file for your network card. It is named ifcfg-eth0 You will need to make a new file named ifcfg-eth0:0 for the second "Virtual IP" address.
Once you have a ifcfg-eth0:x file for any extra IP Addresses that will be bound to that card, you simply restart the network. This will be good thru boots.
i'd like to add that iptables doesn't work with virtual interfaces, so instead of using (for example) "eth0:2", in your iptables script, use the ip you assigned to the virtual interface...
I have an iptables script that runs at startup. I was considering adding the appropriate commands there. The reason being that I frequently make changes to the script and this would allow me easy access to the IP configuration also. Does anyone see any problem with that?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.