LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 10-07-2013, 01:35 AM   #1
austinramsay
Member
 
Registered: Jul 2007
Posts: 277

Rep: Reputation: 31
Forwarding port 23 with iptables


What I'm trying to do is forward port 23 from my laptop to my t2000 server. I've looked around on how to do this but most of the info i found online is complicated and I'm barely learning all of this. So my laptop is connected via wifi to the internet (wlan0), port 23 is already forwarded to the laptop in my router settings. Now I need to forward 23 to my server. Can someone give me a simple solution?

Here's my setup:

Laptop connected to internet via wlan0 (192.168.0.101)
Laptop (eth0 set to 192.168.200.105)
T2000 (eth0 set to 192.168.200.100)

All I'm doing is taking port 23 from my laptop to my server. I'm running slackware by the way.

Last edited by austinramsay; 10-07-2013 at 01:41 AM.
 
Old 10-07-2013, 04:26 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well there are plenty of examples knocking around: http://www.philchen.com/2011/06/21/h...sing-netfilter iptables What's not clear about this guide? No point starting from scratch when there are so many good resources already out there.

And don't think we don't know port 23 is telnet! Don't use telnet. It's evil. if this actually is telnet, I would actually suggest using ssh to reach the laptop and then running telnet from there, or using an ssh tunnel to the laptop and port forwarding port 23 from puTTY or whatever your client system is.
 
Old 10-07-2013, 10:11 AM   #3
austinramsay
Member
 
Registered: Jul 2007
Posts: 277

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by acid_kewpie View Post
well there are plenty of examples knocking around: http://www.philchen.com/2011/06/21/h...sing-netfilter iptables What's not clear about this guide? No point starting from scratch when there are so many good resources already out there.

And don't think we don't know port 23 is telnet! Don't use telnet. It's evil. if this actually is telnet, I would actually suggest using ssh to reach the laptop and then running telnet from there, or using an ssh tunnel to the laptop and port forwarding port 23 from puTTY or whatever your client system is.
Thanks that ones a lot simpler. I would change -i eth0 to -i wlan0 though right? Yes its for telnet, and alright ill just use ssh
 
Old 10-07-2013, 10:41 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
yes, the interface in question would be the inbound one, so wlan0 in your case.
 
  


Reply

Tags
forwarding, iptables, port, slackware


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 09:41 AM
Iptables - port forwarding to blocked port? spangberg Linux - Networking 2 03-26-2010 05:48 AM
[SOLVED] iptables and port forwarding arashi256 Linux - Networking 6 03-10-2010 08:02 AM
port forwarding with iptables sunlinux Linux - Networking 3 05-10-2008 02:33 AM
IPCHAINS port forwarding and IPTABLES port forwarding ediestajr Linux - Networking 26 01-14-2007 08:35 PM

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

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