Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
One IP two boxes?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Cocobo-1
Apprentice
Apprentice


Joined: 18 Dec 2003
Posts: 166
Location: Sweden

PostPosted: Fri Apr 15, 2005 8:48 am    Post subject: One IP two boxes? Reply with quote

I got 2 boxes with one NIC each. They had separate ip addresses and where connected to the Internet throu a switch. Yesterday my isp changed and will only supply one public ip address for a while. This means that one of the boxes have no connection. Is there some easy way to fix this. I don't have time to play around and I'll get an additionall ip in a couple of weeks. The box without a connection don't need Internet. It just needs to access the other box.
_________________
Professor: "Good news, everyone. Several years ago I tried to log onto AOL, and
it just went through. Whee! We're online."
Back to top
View user's profile Send private message
nahpets
Veteran
Veteran


Joined: 05 Oct 2003
Posts: 1178
Location: Montreal, Canada

PostPosted: Fri Apr 15, 2005 8:55 am    Post subject: Reply with quote

1. Use a router instead of a switch.

2. Get a third ethernet card, put it in the box which has the public IP. Set up eth1 on the box to have IP 192.168.1.1 or something similar. Set up box 2 to have 192.168.1.2. You can set up the first box to route traffic to the second box using shorewall.
Back to top
View user's profile Send private message
zieloo
Veteran
Veteran


Joined: 28 Mar 2004
Posts: 1337

PostPosted: Fri Apr 15, 2005 9:11 am    Post subject: Reply with quote

Add second NIC and masquarade the line?
Back to top
View user's profile Send private message
Cocobo-1
Apprentice
Apprentice


Joined: 18 Dec 2003
Posts: 166
Location: Sweden

PostPosted: Fri Apr 15, 2005 9:22 am    Post subject: Reply with quote

That's not what I would call an easy fix. I will not buy stuff to make it work. I hear there is a way to create 2 devices from one NIC. Could I use this to make one device my public ip and set the other to 192.168.0.1 and my other box to 192.168.0.2 so they could talk to eachother?
_________________
Professor: "Good news, everyone. Several years ago I tried to log onto AOL, and
it just went through. Whee! We're online."
Back to top
View user's profile Send private message
Shopro
l33t
l33t


Joined: 12 May 2004
Posts: 678
Location: Dayton, OH, USA

PostPosted: Fri Apr 15, 2005 11:02 am    Post subject: Reply with quote

You might want to have a look at this, maybe it is what your looking for.

https://forums.gentoo.org/viewtopic-t-269710.html
_________________
Just because I have nothing to say is no reason why you shouldn't listen.
Back to top
View user's profile Send private message
fvant
Guru
Guru


Joined: 08 Jun 2003
Posts: 328
Location: Leiden, The Netherlands

PostPosted: Fri Apr 15, 2005 11:24 am    Post subject: Reply with quote

so you have 2 boxes A and B.

A has a public IP and internet access.
B only needs to talk to A
you have a hub or switch.

On A, create an alias for eth0, so it has 2 IP adresses, one public (eth0) and one local (eth0:0) (e.g. in the range 192.168.10.x)
Code:
ifconfig eth0:0 192.168.10.1


on B, change the IP to a local one (in the same range as on A, 192.168.10.x)

now B and A are connected and A has internet access.
If B needs internet access, configure A to provide NAT.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum