LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-16-2017, 12:06 AM   #1
sarveshchandra
LQ Newbie
 
Registered: Aug 2011
Location: India
Distribution: Debian 8.4
Posts: 7

Rep: Reputation: Disabled
How to implement port forwarding using iptables.


Hi,

I need help with port forwarding and iptables, as I have no prior experience in any. Going through the man pages, and, some internet search has not been of much help as yet.

I need to forward incoming ssh requests from a remote machine to a particular local system in my network that sits behind a Squid proxy Server.
The Squid proxy server has the usual two MACs and IP addresses one global, and, one local. The Squid proxy server, that is the server with a global IP address has no existing iptables rules, there are only some entre in the /etc/hosts.allow file to restrict ssh access.

Any help in this matter will be highly appreciated, and, I hope the provided basic information is clear, if not please let me know what more information I need to provide.
 
Old 01-16-2017, 09:24 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,680

Rep: Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971
Quote:
Originally Posted by sarveshchandra View Post
Hi,
I need help with port forwarding and iptables, as I have no prior experience in any. Going through the man pages, and, some internet search has not been of much help as yet.

I need to forward incoming ssh requests from a remote machine to a particular local system in my network that sits behind a Squid proxy Server.
The Squid proxy server has the usual two MACs and IP addresses one global, and, one local. The Squid proxy server, that is the server with a global IP address has no existing iptables rules, there are only some entre in the /etc/hosts.allow file to restrict ssh access.

Any help in this matter will be highly appreciated, and, I hope the provided basic information is clear, if not please let me know what more information I need to provide.
Putting "how to forward ssh traffic through proxy server with iptables in linux" into Google yields a LOT of information. The first two hits:

https://www.digitalocean.com/communi...-with-iptables
http://www.systutorials.com/816/port...sing-iptables/

...complete with examples on how to perform this. And further down the first page:
http://unix.stackexchange.com/questi...-http-or-https

....it shows you how to do this via https, again with examples.
 
1 members found this post helpful.
  


Reply

Tags
iptables, linux, networking, port forwarding, ssh



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
[SOLVED] IPtables : ssh port forwarding one port to another port issue routers Linux - Networking 7 08-07-2018 08:41 AM
Iptables port forwarding impossible to port 25 piquezino Linux - Networking 4 12-03-2013 12:38 PM
Iptables - port forwarding to blocked port? spangberg Linux - Networking 2 03-26-2010 04:48 AM
LXer: Implement load-balancing, port forwarding, and rate-limiting with shd-tcp-tools LXer Syndicated Linux News 0 09-17-2008 10:30 PM
IPCHAINS port forwarding and IPTABLES port forwarding ediestajr Linux - Networking 26 01-14-2007 07:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:09 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