[SOLVED] Linux as a gateway for multiple IP addresses
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.
Hello,
Please consider this guide. If Linux wants to be used as a gateway for several different IP address ranges, then is it possible to set multiple IP addresses on Linux NICs?
Hello,
Please consider this guide. If Linux wants to be used as a gateway for several different IP address ranges, then is it possible to set multiple IP addresses on Linux NICs?
Thank you.
Actually, it is possible to set multiple IP addresses on Linux NICs regardless of your reason. You do not have to want it to act as a gateway, bridge, or router for that to be an option.
See any of the hundreds like https://ostechnix.com/how-to-assign-...card-in-linux/
If you have only one interface, you can configure both IP addresses on it. Linux allows you to configure and use multiple IP addresses on the same interface.
Why ask for confirmation of something that has already been read?
Bill Gates promises to drop off the richest list.
He recently bought a few tanks of gas and a steak dinner.
That did not age well. Gas prices are WAY down and food prices at restaurants never went up that much.
Oh, and Gates GIVES AWAY more money that it would cost to by many small gas station and small steak house chains!
...and food prices at restaurants never went up that much.
Not sure where you live, but where it used to be around $20 for both of us, it is now easily $30 and we are not talking about fancy restaurants... Fast food is now over $10 'each'.
I've never found a need for multiple IP addresses. Just one per NIC card to keep networks separate. For example, all my machines have at least two NICs. One for the Internet, and then one for the internal home network. And then bind certain services to just the home network NIC (like NFS, SFTP, SAMBA, etc.) .
Not sure where you live, but where it used to be around $20 for both of us, it is now easily $30 and we are not talking about fancy restaurants... Fast food is now over $10 'each'.
Sorry to hear that. As I recall Montana and North Dakota have never been the cheapest places to eat out anyway, but I think Gates could afford the $30 without blinking.
Quote:
I've never found a need for multiple IP addresses. Just one per NIC card to keep networks separate. For example, all my machines have at least two NICs. One for the Internet, and then one for the internal home network. And then bind certain services to just the home network NIC (like NFS, SFTP, SAMBA, etc.) .
I started as a NEtwork Admin, Database programmer, and Unix System Administrator in '85 and needed to add more addresses than there were Ethernet interfaces quite often over the years. I was shocked in about 2006 when I needed that on a Linux server and discovered it was EASY! Luckily my next job had management I could talk into purchasing servers with 4 or more Ethernet ports each, and life got easy. Just because one of us has not used the option does not mean others have not found it critical.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.