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.
the ** are for security reasons in posting here; those are real numbers in the commands. The reason I have such strange forwarding is because I have to get through another firewall that blocks most ports besides telnet and http. This worked when I first used it, but yesterday I didn't get a responce on the port 80 forwarding. I don't have httpd running, so I tried service iptables stop and then retyping those commands, but I still can't get through. I tried switching the ports, and then port 80 worked but 23 didn't. I tried ssh'ing straight to 192.168.**.5 and it worked fine. It appears to me that iptables just isn't forward to "outside the box" ip addresses. Any thoughts? some module I need or rule I forgot?
I don't want to discourage posting, but please post something relavent
1) I am trying to forward the requests to 192.168.**.5, not 192.168.1.105.
2) I am using my linux computer as the router
3) putting * will provide security because it could be any number from 0-254
4) 192.168.1.1 is a specific ip address, in classful addressing it belongs to the 192.168.1.0/24 network.
5) the 192.168.1.1/24 address range is not what everybody uses.
6) 192.168.1.1/24 is not a class B network, it is a class C network.
I don't mean to cause hostility or hurt feelings, but please know what your talking about. Could someone please reply that knows something about iptables rules?
Some clarifying questions:
"yesterday I didn't get a responce on the port 80 forwarding"
That means you tried to ssh to you Internet IP on port 80 FROM the Internet?
"I tried ssh'ing straight to 192.168.**.5"
Meaning ssh from local router to 192.168.**.5 ?
To make something out of this we will have to know the current iptables setup. iptables -n -L iptables -n -L -t nat
How far does the packets come? Do you get any incoming packets for the 80 or 23 port on your firewall? iptables -L -n -v
Where are your packets matched, one of your rules or are they matched at the policy?
This is interesting to know because then we can narrow the problem down to where and why it can't establish a connection.
iptables -Z will zero the counters so that you can monitor it more easily.
yes, I do get packets for both. I tried the port 80, and it has twice the number of packets as the one to port 23. Port 23 works, but then port 80 times out.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.