View previous topic :: View next topic |
Author |
Message |
mehmet.scholl n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/10718782034231f6179ef68.gif)
Joined: 11 Mar 2005 Posts: 17
|
Posted: Sun Oct 16, 2005 11:59 pm Post subject: Forwarding ports to multiple machines |
|
|
Could anyone tell me how i´m able to do that? I want to play starcraft over hamachi. we tried to play 2vs2. both teams behind a router. 2vs1 or 1vs2 is no problem but when we try to play a 4 player game the lag will appear about 10 min from the start. searching now about 3 months without a proper hint until today. found an article which suggests forwarding some starcraft ports to both machines behind the router since the game is not really able to work with NAT.
thx |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
libero Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/gallery/Loony Toons/Looney_Toons_-_Speedy.gif)
Joined: 26 Mar 2004 Posts: 87 Location: Tokyo
|
Posted: Mon Oct 17, 2005 2:18 am Post subject: port forwarding basics |
|
|
hi
your description is not clear enough to me to give you exact instructions. But here are some basics of port forwarding.
It uses SSH. You can set up a single port forward like this:
Code: | ssh -L 8080:example.com:80 example.com |
After authentication you get a shell on example.com. This is an example of forwarding web traffic. Then, on your local computer open up a browser, and enter the URL http://localhost:8080/
Your browser sends its request to the local port 8080, which gets passed over to port 80 at example.com, which processes the request and sends the answer back over the same channel to be displayed in your browser.
You forward other ports, including those for your game, the same way.
If you want to forward a single port to multiple destinations simultaneously, that might be difficult. Reading "man ssh" will help a bit.
Hope this helps
L |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Sourcecode Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/1919854772467bde91b3575.jpg)
Joined: 25 Apr 2005 Posts: 392 Location: Germany, Kerpen in sew of Cologne
|
Posted: Mon Oct 17, 2005 2:30 am Post subject: |
|
|
If you want to Forward some Ports use IPTABLES or a Port Forward Daemon like :
* net-misc/portfwd
Latest version available: 0.26_rc6
Latest version installed: 0.26_rc6
Size of downloaded files: 132 kB
Homepage: http://portfwd.sourceforge.net
Description: Port Forwarding Daemon
License: GPL-2
create a config file in /etc called : portfwd.cfg with this in there :
Code: | protocol { port2 { => ip:port2 } }
|
Example :
Code: | tcp { 23 { => 192.168.1.2:55 } } |
or
Code: | udp { 23 { => 192.168.1.2:55 } } |
All peoples wo connect to my maschine on port 23 will be forwarded to the Maschine with the ip 192.168.1.2 on Port 55
wehn you edited your config file start the daemon @boot and on the running system :
rc-update add portfwd default
/etc/init.d/portfwd start _________________ Es gibt bloss eins, was wichtig ist: dass man sterben muss.
Suicide is man's way of telling God, "You can't fire me - I quit."
no one gets out here alive....
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mehmet.scholl n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/10718782034231f6179ef68.gif)
Joined: 11 Mar 2005 Posts: 17
|
Posted: Mon Oct 17, 2005 11:46 am Post subject: |
|
|
Thank you for your help. I think my description was a bit unclear. The forwarding of a special port to a single machine is not my problem. As an example i´m forwarding port 23 on my router to a special machine in my lan on port 50.
The problem is I want to forward port 23 to all of my machines. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Monkeh Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/158504026146c5220a4feda.png)
Joined: 06 Aug 2005 Posts: 1656 Location: England
|
Posted: Mon Oct 17, 2005 12:11 pm Post subject: |
|
|
mehmet.scholl wrote: | The problem is I want to forward port 23 to all of my machines. |
Quite simply, not possible. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
saturas Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/18105499374354d1d2542be.jpg)
Joined: 06 Dec 2004 Posts: 104 Location: romania
|
Posted: Mon Oct 17, 2005 12:30 pm Post subject: |
|
|
Monkeh wrote: |
Quite simply, not possible. |
it is a posibility:
-start a telnet server on each station you want to use telnet service but on diferent ports let's say port1, port2, etc
-use this firewall rule (on the firewall machine) for each station
iptables -t nat -A PREROUTING -d $PUBLIC_IP -p tcp -m tcp --dport $PORT_nr -j DNAT --to-destination $IP_nr:PORT_nr
* replace PORT_nr with the port on witch you set telnet for the IP_nr machine
** take care when decideing witch ports you want to use(do not use 22 for example because it is reserved for ssh)
REVIEW
my example was refering to a server if you manage to make the starcraft client working on a single port every time , you could use the above rule but not with tcp but with UDP (i remember that starcraft uses UDP packages) _________________ "I can't go on. I'll go on."
S.B
Last edited by saturas on Mon Oct 17, 2005 9:05 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bigfunkymo Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/368859194429737890a944.jpg)
Joined: 23 Jan 2004 Posts: 237
|
Posted: Mon Oct 17, 2005 4:31 pm Post subject: |
|
|
Quote: | Quite simply, not possible. |
If you're going to be this ignorant on the subject matter, please quit giving advice. _________________ [No package... Grabbing a set.] |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Monkeh Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/158504026146c5220a4feda.png)
Joined: 06 Aug 2005 Posts: 1656 Location: England
|
Posted: Mon Oct 17, 2005 6:13 pm Post subject: |
|
|
bigfunkymo wrote: | Quote: | Quite simply, not possible. |
If you're going to be this ignorant on the subject matter, please quit giving advice. |
If you're going to be this much of an arsehole, please quit talking.
Anyway: With most normal routers it isn't possible, at least through the web control panel. It IS I admit possible (though the results might not be what you expect) by manually setting iptables rules, but I prefer to assume people don't have that sort of knowledge (and infact I'm not much for doing stuff that way myself), nor a linux box set up as a router (however, many routers are linux, including my own, so you could telnet in, not a permanent solution however). |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
tutaepaki Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 11 Nov 2003 Posts: 279 Location: New Zealand
|
Posted: Mon Oct 17, 2005 8:17 pm Post subject: |
|
|
Sounds like your game is getting confused about seeing >1 gamers from the same IP. You will either need 2 registered IPs at each end, or better, set up a VPN link between the 2 routers so that you can pass the REAL, non-registered IP addresses through the tunnel. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mehmet.scholl n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/10718782034231f6179ef68.gif)
Joined: 11 Mar 2005 Posts: 17
|
Posted: Wed Oct 19, 2005 12:11 pm Post subject: |
|
|
Hey guys calm down. Tutaepaki you are right. The game has problems with NAT and more than one PC behind the router. I think the VPN scenario is the only clean solution i have. I´m configuring OpenVPN at the moment and it looks promising... i will tell you.
thx |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mehmet.scholl n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/10718782034231f6179ef68.gif)
Joined: 11 Mar 2005 Posts: 17
|
Posted: Fri Oct 21, 2005 11:29 pm Post subject: |
|
|
Open VPN is working like a charm. Network is set up. I can see every pc in the new VPN-Network. But....
The f.... damn game lags and lags and lags after 15min of playing ... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|