Home

Results 1 to 8 of 8

Thread: vibe iptables problem

Threaded View

  1. #1
    Join Date
    Sep 2008
    Posts
    128

    vibe iptables problem

    Hi everyone!
    I have configured vibe to use an external GW server for inbound email on a existing setup but the email PF (25) don't seem to work.
    So I wonder if my iptables might be wrong somehow, any iptables freaks here that can assist me with som input on my configuration, below.
    Everything else works as far as I know.

    #!/bin/sh

    IPT="/usr/sbin/iptables"

    case "$1" in
    start)
    echo -n "Starting iptables rules..."

    # Flush old rules and chaines
    $IPT -F
    $IPT -X
    $IPT -Z

    # Set default policies for all three default chains
    $IPT -P INPUT DROP
    $IPT -P FORWARD DROP
    $IPT -P OUTPUT ACCEPT

    # Interfaces
    $IPT -A INPUT -i lo -j ACCEPT
    $IPT -A INPUT -i eth0 -j ACCEPT
    $IPT -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

    ## SSH vpn & Admin net
    $IPT -A INPUT -p tcp -s 192.168.0.0/24 --dport 22 -j ACCEPT
    $IPT -A INPUT -p tcp -s 172.20.0.0/16 --dport 22 -j ACCEPT

    # MSSQL
    $IPT -A INPUT -p tcp -s 172.20.0.5 --dport 4132 -j ACCEPT

    # PortForward 80, 443 & 25
    $IPT -t nat -A OUTPUT -d localhost -p tcp --dport 80 -j REDIRECT --to-ports 8080
    $IPT -t nat -A OUTPUT -d 172.20.0.251 -p tcp --dport 80 -j REDIRECT --to-ports 8080
    $IPT -t nat -A PREROUTING -d 172.20.0.251 -p tcp --dport 80 -j REDIRECT --to-ports 8080
    $IPT -t nat -A OUTPUT -d localhost -p tcp --dport 443 -j REDIRECT --to-ports 8443
    $IPT -t nat -A OUTPUT -d 172.20.0.251 -p tcp --dport 443 -j REDIRECT --to-ports 8443
    $IPT -t nat -A PREROUTING -d 172.20.0.251 -p tcp --dport 443 -j REDIRECT --to-ports 8443
    $IPT -t nat -A OUTPUT -d localhost -p tcp --dport 25 -j REDIRECT --to-ports 2525
    $IPT -t nat -A OUTPUT -d 172.20.0.251 -p tcp --dport 25 -j REDIRECT --to-ports 2525
    $IPT -t nat -A PREROUTING -d 172.20.0.251 -p tcp --dport 25 -j REDIRECT --to-ports 2525

    # Ping
    $IPT -A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT
    $IPT -A INPUT -p icmp -m icmp --icmp-type 11 -j ACCEPT

    echo "Done."
    ;;
    stop)
    echo -n "Stopping iptables..."
    $IPT -F
    $IPT -X
    $IPT -Z

    # Input Rules
    $IPT -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
    $IPT -A INPUT -j REJECT
    echo "Done."
    ;;
    restart)
    echo -n "Restarting iptables..."
    $0 stop > /dev/null
    sleep 1
    $0 start > /dev/null
    echo "Done."
    ;;
    status)
    echo -n "Firewall setup..."
    $IPT -L -v
    $IPT -S
    ;;

    *)
    echo "Usage: $0 {start|stop|restart}"
    ;;
    esac


    ServerSetup
    SLES 11.1
    Vibe 3.2
    MSSQL 2005 (external)
    Last edited by tonybarcelo; 29-Aug-2012 at 09:00 AM.

Posting Permissions

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