Telneting To Linux Machine On Local Network From Internet

Telneting To Linux Machine On Local Network From Internet

Post by Michael Coff » Fri, 24 Mar 2000 04:00:00



Hi All,

I've got a Linux system with a cable modem that is doing IP Masquerading for 3
other machines, all on 192.168.0 network.  From the internet, can I telnet to
one of these machines on my local 192.168.0 network via the Linux system which
acts as the gateway doing the IP Masquerading?

For example, could if my Internet IP address for the IP Masq. machine was
100.200.300.400 and I wanted to get to the machine at local adress
192.168.0.2, could I Telnet to 100.200.300.400/192.168.0.2 or someting like
that and route through the gateway to the local machine?

-Thanks in advance for all help.

-Mike

 
 
 

Telneting To Linux Machine On Local Network From Internet

Post by KROESSCHEL » Fri, 24 Mar 2000 04:00:00


you just solved the shortage of internet addresses and put everyone working
on ipV6 in the shade.
why did not anyone think of that before 100.200.300.400 ?

serious, 192.168.x.x addresses are not addressable from the internet. they
are reserved for private networks, normally behind firewalls or not
connected at all to the internet.
Jaap Krosschell.


>Hi All,

>I've got a Linux system with a cable modem that is doing IP Masquerading
for 3
>other machines, all on 192.168.0 network.  From the internet, can I telnet
to
>one of these machines on my local 192.168.0 network via the Linux system
which
>acts as the gateway doing the IP Masquerading?

>For example, could if my Internet IP address for the IP Masq. machine was
>100.200.300.400 and I wanted to get to the machine at local adress
>192.168.0.2, could I Telnet to 100.200.300.400/192.168.0.2 or someting like
>that and route through the gateway to the local machine?

>-Thanks in advance for all help.

>-Mike


 
 
 

Telneting To Linux Machine On Local Network From Internet

Post by Anthony Schlemme » Sat, 25 Mar 2000 04:00:00



> Hi All,
> I've got a Linux system with a cable modem that is doing IP Masquerading for 3
> other machines, all on 192.168.0 network.  From the internet, can I telnet to
> one of these machines on my local 192.168.0 network via the Linux system which
> acts as the gateway doing the IP Masquerading?
> For example, could if my Internet IP address for the IP Masq. machine was
> 100.200.300.400 and I wanted to get to the machine at local adress
> 192.168.0.2, could I Telnet to 100.200.300.400/192.168.0.2 or someting like
> that and route through the gateway to the local machine?
> -Thanks in advance for all help.
> -Mike

You could telnet to your gateway system and then from there telnet into your
local network machine. Please make sure all critical files are backed up on
all your systems as you're using a very insecure means to access your
systems. Passwords through telnet are not encrypted and so you really run the
risk of having some besides yourself accessing your systems through the
internet.

If you want to login to your systems through the internet you will really
should consider using Secure Shell since it uses encryption.

Tony

--
Anthony Schlemmer

 
 
 

Telneting To Linux Machine On Local Network From Internet

Post by loadfi » Sat, 25 Mar 2000 04:00:00



Quote:> Hi All,

> I've got a Linux system with a cable modem that is doing IP Masquerading
for 3
> other machines, all on 192.168.0 network.  From the internet, can I telnet
to
> one of these machines on my local 192.168.0 network via the Linux system
which
> acts as the gateway doing the IP Masquerading?

> For example, could if my Internet IP address for the IP Masq. machine was
> 100.200.300.400 and I wanted to get to the machine at local adress
> 192.168.0.2, could I Telnet to 100.200.300.400/192.168.0.2 or someting
like
> that and route through the gateway to the local machine?

> -Thanks in advance for all help.

> -Mike

umm...ip addresses are four setsof eight bits so 100.200.300.400 is not
possible.

Anyway, the only solution to addressing a private machine is to use port
forwarding. Read the port forwarding how to at your local mirror.

 
 
 

Telneting To Linux Machine On Local Network From Internet

Post by Mike Reda » Sat, 25 Mar 2000 04:00:00



> Hi All,

> I've got a Linux system with a cable modem that is doing IP Masquerading for 3
> other machines, all on 192.168.0 network.  From the internet, can I telnet to
> one of these machines on my local 192.168.0 network via the Linux system which
> acts as the gateway doing the IP Masquerading?

> For example, could if my Internet IP address for the IP Masq. machine was
> 100.200.300.400 and I wanted to get to the machine at local adress
> 192.168.0.2, could I Telnet to 100.200.300.400/192.168.0.2 or someting like
> that and route through the gateway to the local machine?

yup, sure can. all you have to do is add a little port forwarding onto
your Linux server, something like this will work,

ipmasqadm portfw -a -P tcp -L 100.200.300.400 10023 -R 192.168.0.2 23

You will have to install ipmasqadm first of course :)

also, that IP address you gave (100.200.300.400) is an illegal address,
ip addresses are made up of 4 8 bit segments, which means they must be
in the range of 0-255, just FYI.

You might want to consider using ssh, (check out www.openssh.com, or
search on freshmeat.net for ssh) it offers a secure way to remotely
connect to your PCs. If you use telnet people can obtain your passwords
reletively easily, since telnet doesn't use any encryption.

having said that, you may be opening yourself up to more attacks by
using port forwarding, anyone else care to comment on that?

cheers,
Mike

Quote:> -Thanks in advance for all help.

> -Mike

 
 
 

Telneting To Linux Machine On Local Network From Internet

Post by Michael Coff » Tue, 28 Mar 2000 04:00:00


Many thanks guys!  The 100.200.300.400 was just a dummy (illegal) address so I
didn't have to post my real IP addresses (I've been getting a lot of attempted
hacks lately).

I'll look into ipmasqadm and port forwarding right away - and thanks again!

-Mike




>> Hi All,

>> I've got a Linux system with a cable modem that is doing IP Masquerading for
> 3
>> other machines, all on 192.168.0 network.  From the internet, can I telnet to
>> one of these machines on my local 192.168.0 network via the Linux system
> which
>> acts as the gateway doing the IP Masquerading?

>> For example, could if my Internet IP address for the IP Masq. machine was
>> 100.200.300.400 and I wanted to get to the machine at local adress
>> 192.168.0.2, could I Telnet to 100.200.300.400/192.168.0.2 or someting like
>> that and route through the gateway to the local machine?

>yup, sure can. all you have to do is add a little port forwarding onto
>your Linux server, something like this will work,

>ipmasqadm portfw -a -P tcp -L 100.200.300.400 10023 -R 192.168.0.2 23

>You will have to install ipmasqadm first of course :)

>also, that IP address you gave (100.200.300.400) is an illegal address,
>ip addresses are made up of 4 8 bit segments, which means they must be
>in the range of 0-255, just FYI.

>You might want to consider using ssh, (check out www.openssh.com, or
>search on freshmeat.net for ssh) it offers a secure way to remotely
>connect to your PCs. If you use telnet people can obtain your passwords
>reletively easily, since telnet doesn't use any encryption.

>having said that, you may be opening yourself up to more attacks by
>using port forwarding, anyone else care to comment on that?

>cheers,
>Mike

>> -Thanks in advance for all help.

>> -Mike

 
 
 

Telneting To Linux Machine On Local Network From Internet

Post by Peter Davids » Thu, 30 Mar 2000 04:00:00


Hi,

Consider using SSH1 to telnet into the machine. This is encrypted and thus secure.
I use this in the same way on my Linux RH61 box.
Packages can be found all over the net ( rpmfind.org is a good place to look ).
On my work i use PuTTy for Wxx to manage my private machines and is a good client
for Linux ( fast, reliable and small).

Peter Davidse
The Netherlands



> > Hi All,

> > I've got a Linux system with a cable modem that is doing IP Masquerading for 3
> > other machines, all on 192.168.0 network.  From the internet, can I telnet to
> > one of these machines on my local 192.168.0 network via the Linux system which
> > acts as the gateway doing the IP Masquerading?

> > For example, could if my Internet IP address for the IP Masq. machine was
> > 100.200.300.400 and I wanted to get to the machine at local adress
> > 192.168.0.2, could I Telnet to 100.200.300.400/192.168.0.2 or someting like
> > that and route through the gateway to the local machine?

> > -Thanks in advance for all help.

> > -Mike

> You could telnet to your gateway system and then from there telnet into your
> local network machine. Please make sure all critical files are backed up on
> all your systems as you're using a very insecure means to access your
> systems. Passwords through telnet are not encrypted and so you really run the
> risk of having some besides yourself accessing your systems through the
> internet.

> If you want to login to your systems through the internet you will really
> should consider using Secure Shell since it uses encryption.

> Tony

> --
> Anthony Schlemmer


 
 
 

1. Howto redirect traffic from local machine to internet back to local machine?

Hi!

I have the following problem:
A program (malware) is running on my linux box and i want to check what it
does.
This program sends a lot of traffic to different IP addresses on the internet.
I know the destination port(s), but i do not know the IP in advance.

How can i redirect all traffic (with known dest port) originating from my
local box to the internet back to my local machine?

To make it clearer:
Assume i want to redirect all connection attempts to external mail-servers
coming from my local machine back to my own box.

This is what i tried so far (my box has IP 192.168.100.182):
# cat fw.sh

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -F
iptables -t nat -A PREROUTING -p tcp -d ! 192.168.100.0/24 --dport 25 \
         -j DNAT --to 127.0.0.1:25

but unfortunately, it does not work:
$ telnet mail.gmx.net 25
Trying 213.165.64.20...
Connected to mail.gmx.net.     <---- of course, that's not my machine
Escape character is '^]'.
220 {mp033} GMX Mailservices ESMTP

The same happens with
iptables -t nat -A PREROUTING -p tcp -d ! 192.168.100.182 --dport 25 \
         -j DNAT --to 127.0.0.1:25

Why does this not work?

Can any kind soul please help me?

Thanks in advance!

Regards
Martin.

2. iBCS2 problems

3. Linux machine need local network & internet IP address?

4. WU-ftpd 2.4(7)

5. Imake.tmpl Nowhere to be found

6. connecting machine to internet via modem causes loss of local network access

7. CDROM problem: software or hardware?

8. Machines on local area network can't access internet

9. how can i telnet though a firewall from internet to a local network

10. Local network telnet sessin hangs when connected through ppp to internet

11. Local pop, ftp and telnet not working to local machine.

12. RedHat 8.0 -- Telnet works to local host, but can't telnet from a remote machine