LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-03-2012, 03:46 AM   #1
anas_lko
LQ Newbie
 
Registered: Jan 2012
Posts: 19

Rep: Reputation: Disabled
Configure SSH port forwarding on RHEL6 Machine


i have to machines:
station4.example.com (IP) 172.24.0.4
station5.example.com (IP) 172.24.0.5

have configured apache on station4.example.com and im able to access the websie on station5.example.com now wat i did is; i have applied iptables rule on station4.example.com:
[root@station4~]# iptables -A INPUT -s 172.24.0.5 -p tcp --dport 80 -j REJECT
[root@station4~]# iptables -A INPUT -s 172.24.0.5 -p udp --dport 80 -j REJECT

now im not able to access the website from station5.example.com..

i thaught to impliment SSH port forwarding on station5.example.com i have in "/etc/ssh/sshd_conf" edited:

[root@station5~]# vim /etc/ssh/sshd_conf

AllowTcpForwarding yes

[root@station5~]# service sshd restart
[root@station5~]# chkconfig sshd on

ssh -L localport:remotehost:remoteport ssh-server-ip -fN

[root@station5~]# ssh –L 3025:localhost:80 –fN 172.24.0.4

Please Help..!!
 
Old 03-04-2012, 12:24 PM   #2
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
And what address did you enter in the browser to access the web server?
 
Old 03-05-2012, 12:01 AM   #3
anas_lko
LQ Newbie
 
Registered: Jan 2012
Posts: 19

Original Poster
Rep: Reputation: Disabled
the IP address (172.24.0.4) of the web server..
http://station4.example.com:3025
 
Old 03-05-2012, 04:32 AM   #4
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
Please try: http://localhost:3025 As it’s forwarded by the tunnel, it needs to be addressed locally.
 
  


Reply



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
Port number used by server when using dynamic port forwarding in SSH? kreeder Linux - Networking 4 11-21-2011 02:07 PM
Port forwarding is not working on RHEL6.1 dinesh.tripathi30 Red Hat 2 07-22-2011 10:48 AM
Port forwarding is not working on RHEL6.1 KVM dinesh.tripathi30 Linux - Virtualization and Cloud 0 07-21-2011 12:49 AM
How to configure the serial port of my virtual machine with host machine. akram Linux - Newbie 4 07-31-2009 10:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:10 PM.

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