How to redirect TELNET server?

Asked By 0 points N/A Posted on -

I am using SUSE Linux 11.1. My question is about my problem to redirect Telnet server. Is it possible to redirect incoming Telnet session on the internet to the internal IP? If it is possible, then how can I do it? Are there any risks problems? Please help me. Your ideas are much appreciated.

Answered By 0 points N/A #169867

How to redirect TELNET server?


Dear John,

Well, this is not as easy as you think to redirect the Telnet session into an Internal IP Address. You need to be very good with firewalls and when it comes to SUSE Linux this task is even difficult because it doesn’t have a GUI.

When configuring SUSE you have to be very careful with setting up rules because it is very important that you give complete rules to filter packets. /Sbin/SUSEfirewall2 is the rules generator in the SUSE which uses parameters in /etc/sysconfig to create them.

In order to forward the traffic to an IP Address you need to create two rules in iptables using a console terminal.

/sbin/iptables –t –nat –A PREROUTING –p tcp –I eth0 –d <SOURCE_IP_RANGE> –dport 5000  –j  DNAT    –to  <INTERNAL_IP> : 23

/Sbin/iptables –A  FORWARD   –p tcp –I eth0  –d   <INTERNAL_IP>  –dport 23  –j   ACCEPT

And if you want to monitor the traffic.

/Sbin/iptables  –A  PREROUTING  –dport  5000   –j   LOG  –log-level info  –log  –prefix “port forwarding Telnet:”

You can also insert these rules to the /etc/Inuit. d/rc.local file and run it after the init process.

Thank you.

Rubi Sharlene

Login/Register to Answer

Related Questions