Find the answer to your Linux question:
Results 1 to 2 of 2
When i try to do a #telnet mail.server.net 110 (or) telnet mail.server.net 25 on a client PC (Win) of my LAN... i only get response from my local server and ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2005
    Posts
    3

    What is necesary to forward al packets through iptables??


    When i try to do a
    #telnet mail.server.net 110 (or)
    telnet mail.server.net 25

    on a client PC (Win) of my LAN... i only get response from my local server and no from de mail.server.net. Why the packed is not forward and get only to my localserver instead of the destiny server??

    I have ping to mail.server.net
    my default gateway in the winBoxPC is my localserver Linux with 2 eth
    ip_forward is set to 1

    My iptables...:
    # Generated by iptables-save v1.3.0 on Wed Sep 28 09:43:36 2005
    *nat
    :OUTPUT ACCEPT [0:0]
    :PREROUTING ACCEPT [0:0]
    :POSTROUTING ACCEPT [0:0]
    # redirecting
    -A PREROUTING -i eth0 -j REDIRECT
    COMMIT
    # Completed on Wed Sep 28 09:43:36 2005
    # Generated by iptables-save v1.3.0 on Wed Sep 28 09:43:36 2005
    *mangle
    :FORWARD ACCEPT [0:0]
    :INPUT ACCEPT [297:145791]
    :OUTPUT ACCEPT [376:181063]
    :POSTROUTING ACCEPT [376:181063]
    :PREROUTING ACCEPT [309:146511]
    -A PREROUTING -i eth0 -j MARK --set-mark 0x9
    COMMIT
    # Completed on Wed Sep 28 09:43:36 2005
    # Generated by iptables-save v1.3.0 on Wed Sep 28 09:43:36 2005
    *filter
    :FORWARD ACCEPT [0:0]
    :INPUT ACCEPT [0:0]
    :RH-Firewall-1-INPUT - [0:0]
    :OUTPUT ACCEPT [0:0]
    -A FORWARD -j RH-Firewall-1-INPUT
    -A INPUT -j RH-Firewall-1-INPUT
    -A RH-Firewall-1-INPUT -i lo -j ACCEPT
    -A RH-Firewall-1-INPUT -i eth0 -j ACCEPT
    -A RH-Firewall-1-INPUT -p icmp -m icmp --icmp-type any -j ACCEPT
    -A RH-Firewall-1-INPUT -p ipv6-crypt -j ACCEPT
    -A RH-Firewall-1-INPUT -p ipv6-auth -j ACCEPT
    -A RH-Firewall-1-INPUT -p udp -m udp -d 224.0.0.251 --dport 5353 -j ACCEPT
    -A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
    -A RH-Firewall-1-INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
    -A RH-Firewall-1-INPUT -p tcp -m tcp -m state --dport 25 --state NEW -j ACCEPT
    -A RH-Firewall-1-INPUT -p tcp -m tcp -m state --dport 110 --state NEW -j ACCEPT
    -A RH-Firewall-1-INPUT -p tcp -m tcp -m state -s 192.168.17.0 -i eth0 --dport 21 --state NEW -j ACCEPT
    -A RH-Firewall-1-INPUT -p tcp -m state -m tcp --dport 80 --state NEW -j ACCEPT
    -A RH-Firewall-1-INPUT -p tcp -m tcp -m state -s 192.168.17.0 -i eth0 --dport 10000 --state NEW -j ACCEPT
    -A RH-Firewall-1-INPUT -p tcp -m state -m tcp --dport 22 --state NEW -j ACCEPT
    -A RH-Firewall-1-INPUT -p tcp -m tcp -i eth0 --dport 3128 -j ACCEPT
    -A RH-Firewall-1-INPUT -p tcp -m tcp -i eth0 --dport 8080 -j ACCEPT
    -A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
    COMMIT
    # Completed on Wed Sep 28 09:43:36 2005

    Thanks in Advance for any help!!

  2. #2
    Just Joined!
    Join Date
    Oct 2005
    Posts
    1
    Try this for your nat. This seems to work for me.

    *nat
    :PREROUTING ACCEPT [0:0]
    :POSTROUTING ACCEPT [0:0]
    :OUTPUT ACCEPT [0:0]
    -A POSTROUTING -o eth0 -j MASQUERADE
    COMMIT

    Adrian Page

Posting Permissions

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