Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Access devices factory conf. with IP addr outside
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
yarug
Tux's lil' helper
Tux's lil' helper


Joined: 01 Dec 2004
Posts: 117
Location: NL

PostPosted: Sun Dec 30, 2007 2:24 pm    Post subject: [Solved] Access devices factory conf. with IP addr outside Reply with quote

Hi all,

I have a small network that I maintain that has a few Gentoo boxes configured as follows:

box 1:
#LAN
config_eth0=( "192.168.0.1 netmask 255.255.255.0 brd 192.168.0.255" )
#WAN
config_eth1=( "xxx.xxx.xxx.xxx netmask 255.255.255.128" )
routes_eth1=( "default gw xxx.xxx.xxx.xxx" )

box 2:
config_eth0=( "192.168.0.2 netmask 255.255.255.0 brd 192.168.0.255" )
routes_eth0=( "default gw 192.168.0.1" )

box 3:
config_eth0=( "192.168.0.3 netmask 255.255.255.0 brd 192.168.0.255" )
routes_eth0=( "default gw 192.168.0.1" )

box 1 is connected to the Internet on if eth1 and to the LAN on if eth0. It acts as a gateway/firewall. box 2 and box 3 are on the LAN and have their gateway configured to be box 1.

This setup works fine for most things. However, I have a few devices (router/powerswitch/LOM) that I would like to access from the LAN. These devices are configured with their own static IP address that is outside of my subnet. For example the IP address of the router is 169.254.20.132 and the powerswitch's IP address is 192.168.168.168.

How can I now access these devices from my own subnet (other then reconfiguring these devices physically)? I tried ping and telnet, but that does not work (because the packets are not being routed?).

Any help appreciated!
Nes


Last edited by yarug on Sun Dec 30, 2007 5:19 pm; edited 1 time in total
Back to top
View user's profile Send private message
poly_poly-man
Advocate
Advocate


Joined: 06 Dec 2006
Posts: 2477
Location: RIT, NY, US

PostPosted: Sun Dec 30, 2007 3:31 pm    Post subject: Reply with quote

AFAIK, you do have to either: change subnets, or change the device setup.

What would I do? Dhcp.

poly-p man
_________________
iVBORw0KGgoAAAANSUhEUgAAA

avatar: new version of logo - see topic 838248. Potentially still a WiP.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54848
Location: 56N 3W

PostPosted: Sun Dec 30, 2007 3:36 pm    Post subject: Reply with quote

yarug,

Set some additional IP addresses in the correct subnets to your LAN PC(s)
Code:
ifconfig eth0:1 192.168.168.1
ifconfig eth0:2 169.254.20.1
will add IP addesses in the right subnets until your next reboot.

If you want to add these addresses as part of your net file, see /etc/conf.d/net.example for the syntax.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
yarug
Tux's lil' helper
Tux's lil' helper


Joined: 01 Dec 2004
Posts: 117
Location: NL

PostPosted: Sun Dec 30, 2007 4:28 pm    Post subject: Reply with quote

NeddySeagoon wrote:
yarug,

Set some additional IP addresses in the correct subnets to your LAN PC(s)
Code:
ifconfig eth0:1 192.168.168.1
ifconfig eth0:2 169.254.20.1
will add IP addesses in the right subnets until your next reboot.

If you want to add these addresses as part of your net file, see /etc/conf.d/net.example for the syntax.


Won't that add these IP addresses to the interface on the box where I'm executing those commands? Not sure I understand what this does?

What I'd like to do is to be able to access (ping/telnet) the devices from box 1, box 2 or box 3. Will this allow me to do that? Sorry, I'm a routing n00b...
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54848
Location: 56N 3W

PostPosted: Sun Dec 30, 2007 5:02 pm    Post subject: Reply with quote

yarug,

Yes it will. It allows that box to talk to those subnets.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
yarug
Tux's lil' helper
Tux's lil' helper


Joined: 01 Dec 2004
Posts: 117
Location: NL

PostPosted: Sun Dec 30, 2007 5:19 pm    Post subject: Reply with quote

Ah, this appears to be working. Should be only a temporary solution anyway, until I can change the factory assigned IP addresses.

Many thanks!
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