Explanation of the solution:If you're inside a network with a firewall that blocks pretty much all (UDP) ports and you can't play PlaneShift, this solution could help you. Port 80 TCP most likely is open, because it's HTTP. The idea is to forward the packets to a remote_server outside that network with that firewall and let it create the connection to the PlaneShift server.
Game running on localhost has PlaneShift Server with ip=127.0.0.1 port=7777
localhost listens on udp :7777 and forwards this to tcp remote_server:80 (HTTP)
remote_server listens on tcp :80 and forwards to udp 209.59.234.149:7777
First of all, you have to install zebedee on your localhost and the remote_server:
http://www.winton.org.uk/zebedee/index.htmlOn your localhost go to the PlaneShift directory and add a server with ip=127.0.0.1 port=7777 to data/servers.xml.
After installing zebedee on localhost and remote_host you launch zebedee on the remote_server like this:
zebedee -U -T 80 -s 209.59.234.149:7777And on the localhost:
zebedee -U 7777:remote_server:7777 -T 80Now start PlaneShift, select the server with 127.0.0.1:7777 and enjoy!
The original post:
Hello,
let me come straight to my problem:
I'm inside a network with a firewall that blocks pretty much all (UDP) ports, but port 80 on tcp is open because this is HTTP. My idea was to forward the packets using netcat to a remote server, which again forwards those packets to the PlaneShift server. Localhost and remote_server are both running linux. The setup is as follows:
Game running on localhost has PlaneShift Server with ip=127.0.0.1 port=7777
localhost listens on udp :7777 and forwards this to tcp remote_server:80 (HTTP)
remote_server listens on tcp :80 and forwards to udp 209.59.234.149:7777
What I actually execute on my localhost, before starting PlaneShift and trying to connect to server with ip=127.0.0.1 port=7777:
ssh remote_server 'mkfifo /tmp/planepipe &> /dev/null; nc -lvvp 80 0</tmp/planepipe | nc -u 209.59.234.149 7777 1>/tmp/planepipe &'
mkfifo /tmp/planepipe &> /dev/null
nc -ulvvp 7777 0</tmp/planepipe | nc remote_host 80 1>/tmp/planepipe &
All the netcats are running, no permission problems or things like that.
On my localhost I get the following output from netcat when trying to connect to the server with PlaneShift:
Listening on any address 7777 (cbt)
Received packet from 127.0.0.1:49186 -> 127.0.0.1:7777 (local)
Looks like it is from PlaneShift, because when I don't try to connect to the server it doesn't output anything.
On the remote_server I get this from netcat:
listening on [any] 80 ...
connect to [remote_server] from my_localhost_name [my_localhost_ip] 60393
PlaneShift actually lets me trying to connect, seeing the ping of the server, but after some time a window pops up saying "The server is not running or is not reachable. Please check the website or forums for more info". The netcat pipe actually has to work, because without it PlaneShift doesn't even let my try to connect nor do I see the latency.
Is it possible that PlaneShift uses another port for connecting or after connecting?
Any help is appreciated - also completly new ideas, which would allow me to play PlaneShift inside a network with a firewall that blocks pretty all UDP traffic.
Greetings, naeg
EDIT0: added my localhost' ip address + a name to the /etc/hosts on my remote_server. Output before doing this on remote_server netcat:
listening on [any] 80 ...
my_localhost_ip: inverse host lookup failed: Unknown host
connect to [remote_server] from (UNKNOWN) [my_localhost_ip] 20543
EDIT1: changed the IP address in the PlaneShift data/servers.xml to the inside IP address of my localhost, instead of 127.0.0.1 - same behaviour, still getting that message box. Only the output from netcat on the localhost changes:
Listening on any address 7777 (cbt)
Received packet from <inside_ip_address_localhost>:53566 -> <inside_ip_address_localhost>:7777 (local)EDIT2: It seems like I used different implementations of netcat on the localhost and the remote_host. On the localhost I used gnu netcat, and on the remote_host debian's netcat-traditional. Installed openbsd-netcat on both machines, which resulted in no packet loss, but still the message box when trying to connect. Same for gnu netcat on both machines.
EDIT3: Due to netcat most likely not being able to correctly forward the UDP packets for PlaneShift, I searched for other solutions. I found this udptunnel software:
http://www.cs.columbia.edu/~lennox/udptunnel/On the remote_server:
# udptunnel -vv -s 80 209.59.234.149/7777
Listening for TCP connections on port 80
TCP connection from <my_localhost_ip>/65139
Received packet on TCP, length 23; sending as UDP
Received packet on TCP, length 18; sending as UDP
Received packet on TCP, length 18; sending as UDP
...On the localhost:
# udptunnel -vv -c <remote_host_ip>/80 127.0.0.1/7777
Connected TCP to <remote_host_ip>/80
Received 23 byte UDP packet from 127.0.0.1/53038
Received 23 byte UDP packet from 127.0.0.1/53038
Received 18 byte UDP packet from 127.0.0.1/53038
...But I can't even see the latency when selecting the server, just the text "Failed". Trying to connect just results into the "The server is not available!"-message.
EDIT4: SOLVED! See
http://www.hydlaaplaza.com/smf/index.php?topic=40724.msg457115#msg457115
Hope this helps. Regards - naeg