Find the answer to your Linux question:
Results 1 to 4 of 4
Hello assume i have a sever with X.X.X.X ip address and a server with Y.Y.Y.Y ip address. i have a webserver on Y.Y.Y.Y i need forward all trafic from X.X.X.X ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2014
    Posts
    1

    Forwarding all traffic to other server


    Hello
    assume i have a sever with X.X.X.X ip address
    and a server with Y.Y.Y.Y ip address.
    i have a webserver on Y.Y.Y.Y
    i need forward all trafic from X.X.X.X to Y.Y.Y.Y and when every one entered the X.X.X.X ip address in browser traffic forward to Y.Y.Y.Y and web server response to the user and user watch the website
    what can i do?

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,387
    Hi and welcome,

    redirecting tcp or http is possible, but introduces complexity and additional points of failure.

    Some questions:
    - Are X.X.X.X and Y.Y.Y.Y in the same network?
    - What is the motivation to redirect traffic from one server to the other?
    - Your users really enter an IP address into the browser?
    - Why not just introduce DNS and just point a hostname to Y.Y.Y.Y?
    You must always face the curtain with a bow.

  3. #3
    Linux Engineer
    Join Date
    Dec 2013
    Posts
    1,201
    The most common way to redirect a web request is with one of the 3xx http headers. "301 moved permanently" probably being the most common. The users browser responds to the message by making the request of the server address in the header. It depends on what you are trying to accomplish. There are also proxy servers and load balancers that do a similar thing in varying ways. If you explain what you're trying to accomplish someone might be able to give a more specific answer.

  4. #4
    Linux Engineer docbop's Avatar
    Join Date
    Nov 2009
    Location
    Woodshed, CA
    Posts
    932
    Can use IPTABLES...
    https://serverfault.com/questions/27...nother-machine

    Like other say the best solution depends on what you're trying to accomplish.

Posting Permissions

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