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

    hellp.... opening specific port on specific ip at iptables

    Hi all,

    please help how can i open a secific port at specific ip using iptables on my Gateway n Firewall server. eg port 6900 for
    we are using Rethat with iptables.
    anyone know ?

    Thanks for helping,


  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Täby, Sweden
    How do you mean "open"? Do you mean let traffic through to local (that is, on the same system) services, or forward traffic through to another node?

  3. #3
    Hi Mr. moderator,

    yes forward traffic through to another node, outside our local network.

    thanks for helping,

  4. $spacer_open
  5. #4
    Linux Enthusiast Opnosforatou's Avatar
    Join Date
    Dec 2003
    Vleuten, The Netherlands
    INTERNETIP="" (Replace with you internet IP address."
    DESTINATION_IP="" (Replace with IP of target address)
    iptables -t nat -A PREROUTING -i ppp0 -p tcp --sport $UNPRIVPORTS -d $INTERNET_IP --dport $SETTLERS_PORT -j DNAT --to-desti
    nation $DESTINATION_IP
    iptables -A FORWARD -i ppp0 -o eth0 -p tcp --sport $UNPRIVPORTS -d $DESTINATION_IP --dport $SETTLERS_PORT -m state --state NEW -j ACCEPT
    I'm asuming the following:

    ppp0 is your internet interface
    eth0 is you local network.

    These rules forward and allow you to play the game, and host, Settlers 3D from behind you firewall.

    Good luck.

    Some handy reading:

    Linux Advanced Routing & Traffic Control HOWTO
    Iptables Tutorial 1.1.19

    ---[ MS09-99896 - Vulnerability in All MS Windows OS ; Using Windows Could Allow Remote Code Execution. ]---
    Hardware: Asus P4P800, 1GB, P4-3Ghz, Asus V9950, Maxtor ATA HD\'s, 3Com GBit lan, Audigy ZS Plat.

Posting Permissions

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