LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-25-2013, 07:46 AM   #1
wabit
LQ Newbie
 
Registered: Mar 2013
Posts: 2

Rep: Reputation: Disabled
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.
 
Old 03-25-2013, 08:20 AM   #2
yowi
Member
 
Registered: Dec 2002
Location: Au
Distribution: Debian
Posts: 209

Rep: Reputation: 55
The Linux Network Administrators Guide will cover most, if not all of it.
 
Old 03-25-2013, 08:57 AM   #3
wabit
LQ Newbie
 
Registered: Mar 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
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?
 
Old 03-25-2013, 03:26 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,361

Rep: Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692
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)
 
Old 03-26-2013, 04:27 AM   #5
yowi
Member
 
Registered: Dec 2002
Location: Au
Distribution: Debian
Posts: 209

Rep: Reputation: 55
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.
 
Old 03-27-2013, 03:39 PM   #6
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to connect systems in private network with public network jeetv33 Linux - Networking 2 01-12-2011 08:55 PM
How to connect systems in private network with public network jeetv33 Linux - Newbie 4 01-11-2011 11:26 AM
Why am I seeing private ip's on a public network rbees Linux - Networking 2 11-06-2008 06:54 PM
public and private network here2serve Linux - Distributions 7 12-03-2006 12:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration