Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Maybe you have another rule before this one? And of course, you must hava SNAT rule... Maybe you have FORWARD closed? show us iptables -L and iptables -L -t nat
I found some garbage in my tables.
As you can see I am trying to do a simple port forward.
I flushed all my other junk rules and have forward set to accept.
So is this correct.
Yes, this is correct, but remember about FORWARD chain (you must allow for this traffic there if you have DROP policy on it), and of course you must have SNAT rule in order to make any usefull efect. something like this;
iptables -A POSTROUTING -t nat -o eth0 -j SNAT --to-source 123.123.123.123 -s 192.168.1.202
I found some garbage in my tables.
As you can see I am trying to do a simple port forward.
I flushed all my other junk rules and have forward set to accept.
So is this correct.
Of course you have 123.123.123.187 ip addres on eth0, right?
This rules should work. Hmm... Try to iptables -L -t nat -v to look if any packets coming in this dnat chain. Try to use tcpdump on your LAN card (eth1?), to watch if any packets to telnet service on that lan host coming. something like;
tcpump -i eth1 port 23 and host 192.168.1.202 -n
And watching on tcpdump try to login on telnet (from any remote machine out of your network). Tell us if any packets going out through your router to that telnet machine (tcpudmp show it to you).
You may need to try it, get someone to initiate a telnet session while looking at tcpdump to see what's happening, and what port is actually being used, (because what you have looks ok to me, but wouldn't know for sure unless tested).
You might also need tell the client to specify port 23
Seeing as how i was LOST. I opted to strip out any garbage and start from scratch.
My Firewall is set to simple NAT outbound connections to share the internet.
All default chains are set to allow.
________________
So NOW I want to just forward inbound ( from the internet ) telnet ( port 23) connections to the WAN ip of 123.123.123.187 (eth0) through 192.168.1.1 (eth1) to to host server 192.168.1.202 on port 23.
Please advise accordingly.
Thanks a lot.
It looks like packets to telnet machine going out from router (2 pkts). The question is; is 192.168.1.203 answering fot this packets? Is there a telnet service? check it by running tcpdump with option; tcpdump -i eth1 host 192.168.1.203 and port 23 -n
And watch if telnet machine answering for syn packet (try to login from "somewhere in world" to telnet, and in this time look on tcpdump screen)
If you can, show here some log of this tcpdump session.
I can telnet on port 23 to the internal machine from my firewall so I know that much works. As well as a ton of other hosts. Its an application server and everyone telnets into it. Could you suggest some rules again; just the simplest port forward rule, minimal stuff needed to get the port forwarded.
This is what I have ATM and it does not work.
could there be something besides the firewall that would block all inbound telnet connections on the firewall computer?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.