LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-29-2011, 11:49 AM   #1
omle
LQ Newbie
 
Registered: Nov 2010
Posts: 2

Rep: Reputation: 0
Arrow ip forwarding 1 machine to another


Hi

have spent many a good hour trying to get this to work and now im not sure that i can, what im trying to do is forward connections made on one machine a specific port to a different ip address (different machine)

ive tried

Code:
iptables -A FORWARD -p tcp -i eth0 --dport 27960 -j ACCEPT

iptables -t nat -A PREROUTING -p tcp --dport 27960 -i eth0 -j DNAT --to xx.xx.xxx.xxx:27960
also have tried to use rinetd which also didnt work

the machines are located in different parts of germany they are gameservers im trying to forward all who connect on the old ip straight to the new ip and port instantly but just cant seem to get it working,

any help would be gratefully accepted

thanks

omle
 
Old 09-29-2011, 11:49 PM   #2
goossen
Member
 
Registered: May 2006
Location: Bayern, Germany
Distribution: Many
Posts: 224

Rep: Reputation: 41
Hello!, try with:
Code:
iptables -t nat -A PREROUTING -p tcp --dport 27960 -i eth0 -j DNAT --to-destination xx.xx.xxx.xxx:27960
and
Code:
echo "1" > /proc/sys/net/ipv4/ip_forward
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Forwarding traffic to another machine eaglefly Linux - Networking 6 09-19-2011 02:33 PM
Stop forwarding to certain machine bratch Linux - Networking 1 03-24-2005 06:18 PM
Forwarding ONE port to remote machine supertrout Linux - Networking 2 12-14-2004 10:02 PM
Port forwarding to RH 9.0 machine not working Jeeves79 Linux - Networking 3 05-29-2004 03:11 PM
port forwarding to win 2k machine. Morphey Linux - Networking 0 03-30-2002 03:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration