Linux - Networking This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
03-25-2013, 07:46 AM
|
#1
|
LQ Newbie
Registered: Mar 2013
Posts: 2
Rep: 
|
public and private on the same network
Hi,
I have an internet connection where the ISP provides me with a block of 8 Public IP address which I use for various things around the house, but my router also has a DHCP server where it hands out Private IPs (192.168.*.*) for guests.
Basically I am wanting to replace my router with my ubuntu server, so that my some of my pc's can be configure with the Public IP's but devices on my wireless and wired PCs can still gain Private IP's.
eventually I will be wanting to get the two network to be able to see each other as well but I assume that will be done with routing once I have the two networks running
currently I have just two NICs one for the internet connection and one for my internal network.
Any help on this would be great.
|
|
|
03-25-2013, 08:20 AM
|
#2
|
Member
Registered: Dec 2002
Location: Au
Distribution: Debian
Posts: 209
Rep:
|
The Linux Network Administrators Guide will cover most, if not all of it.
|
|
|
03-25-2013, 08:57 AM
|
#3
|
LQ Newbie
Registered: Mar 2013
Posts: 2
Original Poster
Rep: 
|
Thanks for that yowi is there any specific section i should be looking at as its a pretty huge document.
Is it also possible to have one NIC be able to see two different networks or will i need three?
One for the internet and one for each internal network?
|
|
|
03-25-2013, 03:26 PM
|
#4
|
Moderator
Registered: Mar 2008
Posts: 22,361
|
You kind of have a few issues. One is a physical lan/wan. The second is simple tcp/ip connections.
Almost every modern nic can have multiple IP addresses assigned to it. So you would get 2 or more subnets running on the same physical media.
Remember, a subnet plus the ip address offers only one thing. That which is within subnet and that which is outside of subnet. If outside and you want to route it what do you need?
A usual use of two physical nic cards is that the physical media is not connected between lan and wan.
(gateway/router or such)
|
|
|
03-26-2013, 04:27 AM
|
#5
|
Member
Registered: Dec 2002
Location: Au
Distribution: Debian
Posts: 209
Rep:
|
Some advanced routing to cover the mix of subnets, IP-Masquarade (NAT) is what enables private IP's to connect to the rest of the world.
Be sure to understand when each of the different tables and chains within iptables is relevant, good document for that here:
http://www.netfilter.org/documentati...ing-HOWTO.html
Personally I've not had to deal with real and private IP's on the one side of a gateway and would reduce complexity significantly by not using the real IP's if they are not absolutely necessary. Port forwarding can allow external clients to connect to services on private IP's.
|
|
|
03-27-2013, 03:39 PM
|
#6
|
Senior Member
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024
Rep:
|
What you want to do is use http://www.google.com/search?q=1+to+1+NAT
Each system inside your network will have it's private IP and then the ones that you use a public IP for get that public IP NAT'd at the router.
|
|
|
All times are GMT -5. The time now is 07:28 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|