Find the answer to your Linux question:
Results 1 to 10 of 10
Hi folks The mail/database/web server is behind a router. Whether I have to forwarding all following ports to the local ip address of the server? 25 80 110 143 993 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,787

    Re port forwarding


    Hi folks

    The mail/database/web server is behind a router. Whether I have to forwarding all following ports to the local ip address of the server?

    25
    80
    110
    143
    993
    8080

    Any additional port I have to forward in addition?

    TIA


    B.R.
    satimis

  2. #2
    Linux Engineer Kloschüssel's Avatar
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    773
    hi

    it purely depends on your configuration. i would always open port 666 for the doom services. what does the 8080 port do in your configuration? if it was just mail, http and such 8080 is completely nonsense.

  3. #3
    Just Joined!
    Join Date
    Aug 2009
    Location
    Wil, Switzerland
    Posts
    10
    Like Kloschüssel said, it depends on what services should be accessible behind the router. Maybe TCP port 443 if you use HTTPS.

  4. #4
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,787
    Hi Kloschüssel and dmsnail,

    Thanks for your advice.

    The router is used for testing and haven't been configured for sometimes. I just checked it before posting. There are many ports there which use are out of my recollection. I just pick up some of them.

    Please advise which basic ports are necessary for;

    1)
    Mail Server including Web Mail. Https is used

    2)
    Web Server

    3)
    Database Server


    TIA


    B.R.
    satimis

  5. #5
    Just Joined!
    Join Date
    Aug 2009
    Location
    Wil, Switzerland
    Posts
    10
    I can't give you any advice until I know exactly what services you run, what databases you use, and what other systems require access to those systems. And how users authenticate on the mail server.

  6. #6
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,787
    Quote Originally Posted by dmsnail View Post
    I can't give you any advice until I know exactly what services you run, what databases you use, and what other systems require access to those systems. And how users authenticate on the mail server.
    Hi,

    Mail/Database/Web Server

    Mail server - Postfix, SMTP and POP3
    Database - MySQL
    Web Server - Apache2, PHP5
    WebMail - SquirrelMail/RoundCube
    etc

    Clients can send/receive mails via Internet. Remote access is NOT required. Database is used holding data of the mail server.

    Should further information is required, please advise me. TIA

    B.R.
    satimis

  7. #7
    Linux Engineer Kloschüssel's Avatar
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    773
    well, now do a:

    Code:
    foreach i in "Mail server - Postfix, SMTP and POP3
    Database - MySQL
    Web Server - Apache2, PHP5
    WebMail - SquirrelMail/RoundCube"; do
    
    ports=getPortsUsedBy $i;
    foreach port in $ports; do
    addPortToFirewall $port;
    done;
    done;


    seriously: check your configuration files what ports these services use and set up a forwarding.

  8. #8
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,787
    Quote Originally Posted by Kloschüssel View Post
    well, now do a:

    Code:
    foreach i in "Mail server - Postfix, SMTP and POP3
    Database - MySQL
    Web Server - Apache2, PHP5
    WebMail - SquirrelMail/RoundCube"; do
    
    ports=getPortsUsedBy $i;
    foreach port in $ports; do
    addPortToFirewall $port;
    done;
    done;


    seriously: check your configuration files what ports these services use and set up a forwarding.
    Hi,

    Thanks for your advice.

    I don't have "foreach" command here.

    $ apt-cache search foreach
    Code:
    librevm0 - The Reverse Engineering Vector Machine
    librevm0-dev - The Reverse Engineering Vector Machine
    r-cran-foreach - GNU R foreach looping support
    Googling said "foreach is in csh". Please advise where can I download it? TIA

    B.R.
    satimis

  9. #9
    Linux Engineer Kloschüssel's Avatar
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    773
    Please re-read my post and this time try to understand what I wrote there. I intended this pseudo-bash-code as a little gag, but didn't believe you would use it literally.

    So this is what you should really do (since the beginning of the thread):
    check your configuration files what ports these services use and set up a forwarding
    configuration files usually are located within /etc/ of your server. i.e. the apache2 configuration usually is at /etc/apache2/, mysql at /etc/mysql/ and so on.

  10. #10
    Just Joined!
    Join Date
    Aug 2009
    Location
    Wil, Switzerland
    Posts
    10
    Quote Originally Posted by satimis View Post
    Mail server - Postfix, SMTP and POP3
    Database - MySQL
    Web Server - Apache2, PHP5
    WebMail - SquirrelMail/RoundCube
    Ok so then... TCP ports 25, 110, 443, 80

    Or, provide further information about your setup.

Posting Permissions

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