Find the answer to your Linux question:
Results 1 to 2 of 2
Hello! I have a question about port forwarding with iptables. I've searched around alot on the net and read a few tutorials on iptables so if this question has been ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2004
    Posts
    1

    port forwarding


    Hello! I have a question about port forwarding with iptables. I've searched around alot on the net and read a few tutorials on iptables so if this question has been asked before please go easy on me. Here is what I'm trying to do, the linux server that I'm using has a local ip of 192.168.0.41, if any computer connects to port 23 I want it to forward it to port 23 of 192.168.0.1. Can someone please help?? Thanks

  2. #2
    Linux Engineer
    Join Date
    Nov 2002
    Location
    Queens, NY
    Posts
    1,319
    Hmm, the IPs are a bit but nontheless
    Code:
    iptables -t nat -A PREROUTING -p tcp --dport 23 -j DNAT --to-destination 192.168.0.41
    I'd strongly recommend you use SSH instead of telnet.
    The best things in life are free.

Posting Permissions

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