You are not logged in.

#1 2008-08-19 11:48:02

RAH
Member
Registered: 2008-06-20
Posts: 205

[SOLVED] SSH Connections

Hello,

I have a laptop running off a wireless connection to the router and a desktop PC running off a USB/Ethernet connection to the router.  I have OpenSSH installed on both machines.  How do I sort port forwarding correctly?  The local machine IP's keep changing.

Thanks.

Last edited by RAH (2008-08-20 10:01:17)

Offline

#2 2008-08-19 12:08:56

robmaloy
Member
From: Germany
Registered: 2008-05-14
Posts: 263

Re: [SOLVED] SSH Connections

either:
set static ip for your machine

or:
write a script that ssh's into the router and changes the iptables rules




first one will be 10x easier


☃ Snowman ☃

Offline

#3 2008-08-19 12:16:31

RAH
Member
Registered: 2008-06-20
Posts: 205

Re: [SOLVED] SSH Connections

How do I set a static IP?  Thanks.

Offline

#4 2008-08-19 12:23:54

robmaloy
Member
From: Germany
Registered: 2008-05-14
Posts: 263

Re: [SOLVED] SSH Connections

check the wiki!


☃ Snowman ☃

Offline

#5 2008-08-19 12:28:54

RAH
Member
Registered: 2008-06-20
Posts: 205

Re: [SOLVED] SSH Connections

I read the Wiki however I'm still not sure I understand this.  I'm currently using DHCP.

Offline

#6 2008-08-19 12:42:19

Garns
Member
Registered: 2008-05-28
Posts: 239

Re: [SOLVED] SSH Connections

Check your router's dhcp config, usually there is some way to assign IPs by MAC-Adress.

Offline

#7 2008-08-19 18:22:35

Zeist
Arch Linux f@h Team Member
Registered: 2008-07-04
Posts: 532

Re: [SOLVED] SSH Connections

RAH wrote:

I read the Wiki however I'm still not sure I understand this.  I'm currently using DHCP.

You should put lines that look something like:

eth0="eth0 192.168.1.101 netmask 255.255.255.0 broadcast 192.168.1.255"
INTERFACES=(eth0)

...

gateway="default gw 192.168.1.1"
ROUTES=(gateway)

In your rc.conf... with the correct values for your network of course.


I haven't lost my mind; I have a tape back-up somewhere.
Twitter

Offline

#8 2008-08-19 20:34:11

Mektub
Member
From: Lisbon /Portugal
Registered: 2008-01-02
Posts: 647

Re: [SOLVED] SSH Connections

As Garns above says, most routers allow you to assign IPs depending on the MAC Address.

This will let you keep DHCP, which is important if you are mobile.

You can find the MAC Address for example with 'ifconfig'.

My router, an ASUS 500gp, on the DHCP configuration tab has an option 'assign IP manually', in fact a
table with 'MAC --> IP' assignments.

Look for a similar option on your router configuration.

Mektub


Follow me on twitter: https://twitter.com/johnbina

Offline

Board footer

Powered by FluxBB