Find the answer to your Linux question:
Results 1 to 2 of 2
Hi all, I am stuck with a problem I cannot solve. The situation: server connected to the internet and two servers behind it. The idea is that I want to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2009
    Posts
    1

    Question iptables, two services on one port


    Hi all, I am stuck with a problem I cannot solve. The situation: server connected to the internet and two servers behind it. The idea is that I want to use one and the same port on the outer server for two services, but the two services run on the two servers in the inner network. So if I type let's say: "example.com:8080/http" in the browser, I go to the http server on one of the servers, and when I go to console and type: "mysql -h example.com --port=8080" I get connected to the mysql on the other inner server.
    I thought that iptables could check the packet types (if http or other) and if it is http, then just forward to apache, and if not then to mysql.

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,672
    Here is an IPTABLES tutorial you could read through.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •