Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Iptables? - Prevent Request To Particular IP & Port, Redirect To Local

    I'm running a Debian 5 machine and am in need of a way to stop a daemon (bacula-fd) from calling an IP address (which is external) at port 9103 and rather have the request be redirected to the localhost on the same port. I have been trying to setup all sorts of iptables rules for forwarding and prerouting but just can't get this to work.

    The reason I want to do this is to have the request go through a SSH tunnel for security purposes. I do not have a way to change the IP address nor port that the daemon is using. This is because it gets it from bacula-sd daemon on the main server and I have many other clients connecting to it.

    To summarize and hopefully make this a little more clear, I'm looking for:

    Daemon makes request to eth0 for IP, port 9103. Something (iptables or something else) prevents request from going out on internet and redirects to, port 9103.

    Am I making sense? Can this be done?

    Any help is much appreciated. Thanks!

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Two notes:
    1) Here is a HowTo for ssh tunnels from the bacula wiki
    sshtunnel [Bacula DokuWiki]

    2) Slightly OffTopic: You can encrypt the backupdata on the client before sending it to the SD.
    Data Encryption
    You must always face the curtain with a bow.

Posting Permissions

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