Results 1 to 5 of 5

Thread: Port forwarding with iptables

  1. #1
    Join Date
    Mar 2010
    Posts
    184

    Port forwarding with iptables

    Hello,
    I use RedHat 8.0 and everything I want to do is simply forward all requests to port, say 5000, which happens to my machine on another computer to another port. I thought it would be really simple with iptables and I've also found plenty of examples on the web, but none works. Please, help me someone. So, there should be no reason why it crashes. I do not know what to do. Help me someone, give me an alternative to forward a port other than iptables. Thanks in advance.
    www.techarena.in

  2. #2
    Join Date
    Nov 2009
    Posts
    335

    Re: Port forwarding with iptables

    Hello,
    I think that the ip destination does not correspond at all to 192.168.2.3 (just an example), is this a typo, or is it really your order? already see that side. Otherwise, it may also include improperly installed system. Linux does he know that you use iptables, for the preliminaries, and compare the order that you get. I think you should post the output of the iptable that you are getting.

  3. #3
    Join Date
    Dec 2009
    Posts
    202

    Re: Port forwarding with iptables

    Hello,
    I do have a similar kind of a problem. For what is the ip: yes it is a typo, I do not think iptables are improperly installed because when I make a port DENY specific examples and it works wonderfully well. It really seems just when I do a port forwarding it does not work. Does it work on your machine you do a port forwarding with iptables?

  4. #4
    Join Date
    Mar 2010
    Posts
    184

    Re: Port forwarding with iptables

    Hello,
    I have RedHat 8.0 and my kernel version is 2.4.18. I do not know what's the latest version, but already starting either version 8.0 of RedHat kernel should not be that old. I'm really no expert on iptables (or anything for that matter), but I read the tutorials using the DROP and DENY did not have the same function in the sense DENY or returns a message to the user as which the service is prohibited while the DROP simply ignores the requests and returns no explanation to the user. Any more information regarding the same is appreciated. Thanks in advance.
    www.techarena.in

  5. #5
    Join Date
    Nov 2009
    Posts
    347

    Re: Port forwarding with iptables

    Hello,
    1) First type the following command that ensures that requests arriving on port 5000 at IP 192.168.2.2 be forward to the IP address on port 80 192.168.2.3.
    Code:
    iptables-t nat-A PREROUTING-d 192.168.3.3-p tcp - dport 5000-j DNAT - to-dest 192.168.3.3:80
    2) Now is the logical part, but to think. Must type the following command will change the IP address of the addressee, package forward to that of the machine with iptables (192.168.2.2). All this is very logical because if the answer to the query will return forward directly to the machine where the original query was issued and it is not okay because it is necessary that all the traffickers transported through the computer with iptables who will undertake to follow properly all the requests. I hope this information will help you.

Similar Threads

  1. Replies: 4
    Last Post: 29-10-2011, 09:15 AM
  2. Replies: 5
    Last Post: 02-07-2011, 05:00 AM
  3. VPN vs Port forwarding
    By ODTech in forum Networking & Security
    Replies: 1
    Last Post: 29-10-2010, 03:27 AM
  4. Port Forwarding on Mac OS X
    By TalinF in forum Networking & Security
    Replies: 9
    Last Post: 25-06-2010, 07:12 AM
  5. Port Forwarding Help Please.
    By Zelos37 in forum Networking & Security
    Replies: 6
    Last Post: 20-01-2009, 10:03 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,481,947.11830 seconds with 17 queries