LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-19-2009, 12:08 PM   #1
Lordlava
LQ Newbie
 
Registered: Dec 2008
Location: Perth, Western Australia
Posts: 16

Rep: Reputation: 0
Access to Local Area Network Linux PC from a Vista PC


I have a number of PCs running on a local area network.

One runs Vista and one runs Red Hat 9 Linux (Yes I know it is old but the applications only run on this version).

I also remotely access an RH9 server offsite.

Using Putty and CuteFTP8 and web cgi files I am able to get into and run and change applications on the remote RH9 server.

I can also login directly to my local RH9 PC and do what I like that way.

However I can not get access through Putty or Cute or web cgi to my RH9 PC from the Vista PC. Although the application client runs perfectly against the local version of the application database on my Linux PC.
The message from Putty is (after a long delay) "Network error : Connection timed out".
Cute FTP fails with a similar message.

Do I need to do something on my modem/router to allow the connection (allow ports or something?) or do I need to do something on the RH9 PC?

If this is some basic security change I need to make to the PC I would appreciate some pointers on where to look and what to do.

Thanks,

Lordlava
 
Old 03-19-2009, 12:17 PM   #2
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
Hi, Red Hat 9 is quite old... but I am guessing the port is probably blocked via firewall. See if you have iptables running, iptables -nvL and copy the output here in code tags, (iptables is in /sbin if you are not running with a user who has /sbin in their $PATH). What will be looked into, is if port 22 is open or closed. I believe FTP uses 21, SCP and SFTP use 22 tho.

Last edited by r3sistance; 03-19-2009 at 12:21 PM.
 
Old 03-19-2009, 10:28 PM   #3
Lordlava
LQ Newbie
 
Registered: Dec 2008
Location: Perth, Western Australia
Posts: 16

Original Poster
Rep: Reputation: 0
iptables listing

Attached is the output from the iptables -nvL comand
It does not appear to mean anything to me.


Chain INPUT (policy ACCEPT 18 packets, 5788 bytes)
pkts bytes target prot opt in out source destination
7489 516K RH-Lokkit-0-50-INPUT all -- * * 0.0.0.0/0 0.0.0.0/0

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 RH-Lokkit-0-50-INPUT all -- * * 0.0.0.0/0 0.0.0.0/0

Chain OUTPUT (policy ACCEPT 7488 packets, 512K bytes)
pkts bytes target prot opt in out source destination

Chain RH-Lokkit-0-50-INPUT (2 references)
pkts bytes target prot opt in out source destination
0 0 ACCEPT udp -- * * 61.9.133.193 0.0.0.0/0 udp spt:53 dpts:1025:65535
3 361 ACCEPT udp -- * * 61.9.242.33 0.0.0.0/0 udp spt:53 dpts:1025:65535
0 0 ACCEPT udp -- eth0 * 0.0.0.0/0 0.0.0.0/0 udp spts:67:68 dpts:67:68
0 0 ACCEPT udp -- eth1 * 0.0.0.0/0 0.0.0.0/0 udp spts:67:68 dpts:67:68
7461 509K ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
0 0 REJECT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpts:0:1023 flags:0x16/0x02 reject-with icmp-port-unreachable
0 0 REJECT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:2049 flags:0x16/0x02 reject-with icmp-port-unreachable
7 1166 REJECT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpts:0:1023 reject-with icmp-port-unreachable
0 0 REJECT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:2049 reject-with icmp-port-unreachable
0 0 REJECT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpts:6000:6009 flags:0x16/0x02 reject-with icmp-port-unreachable
0 0 REJECT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:7100 flags:0x16/0x02 reject-with icmp-port-unreachable
 
Old 03-21-2009, 04:54 AM   #4
Lordlava
LQ Newbie
 
Registered: Dec 2008
Location: Perth, Western Australia
Posts: 16

Original Poster
Rep: Reputation: 0
OK Can I ask the question a different way?

Assuming the local RH9 Linux PC is blocking access how can I identify the port that I should be using or alternatively authorise a port to allow access? For example the remote Linux server allows access via port 22. It would be nice if I could do the same. Then I can type in the local PC IP address and the port and I am in.

Is there somewhere I can look that explains this in English or if simple enough can someone explain it here?
 
Old 03-22-2009, 08:04 PM   #5
Lordlava
LQ Newbie
 
Registered: Dec 2008
Location: Perth, Western Australia
Posts: 16

Original Poster
Rep: Reputation: 0
OK I found a solution that appears to work.

cd /sbin

iptables -F INPUT
iptables -A INPUT -p tcp --dport 22 -s '192.168.1.103' -j ACCEPT
service iptables save

Where the IP address is the local IP address allocated by the modem/router and 22 is the portno I wanted access to.
Now I can use Putty to login into the Linix RH9 PC.

I could not get the IP range working or the REJECT command but I am happy and can proceed.

Thanks.
 
  


Reply

Tags
firewall, iptables, lan, putty, windows



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 can I connect local area network in linux satan0714 Linux - Newbie 1 04-10-2008 08:20 PM
local area network in fedoracore6 rigs_wang Fedora 3 10-09-2007 12:00 PM
see the local area network vipin_jss Linux - Software 2 08-27-2007 05:50 PM
Local area network Anthony123 Linux - Laptop and Netbook 1 08-13-2003 05:00 AM
Local area network Anthony123 Linux - Networking 1 08-13-2003 04:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:40 AM.

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