PDA

View Full Version : Phoenix - Running or trying to run a server?


TasKiNG
10-07-2007, 09:44 AM
I am trying to run a Phoenix server but having trouble so looking to you guys for some inspiration. http://static.rcgroups.com/forums/images/smilies/smile.gif
First of all I am using a Cable modem and a seperate router. connected to the router I have a Server and my main PC.
I am running phoenix on the server in multiplayer mode.
The server is registering itself with PhoenixNet as it is visible on peoples server lists but when anyone tries to connect, they get the message "There was a problem connecting to the session - try again later".
I have set my router up to pass all UDP packets for ports 9000-9005 to the server and set up firewall rules to let UDP through on these ports.

My router is a M0n0wall router but I have also tried a belkin router but still have the same problem.

Now if I disconnect the router and connect my server directly to the cable model then the server works and people can connect. This of course limits me to only having one pc connected to the net though so it is not an option.

Any help / sugestions would be appreciated.

I would also like to know if you have tried setting up a phoenix server and whether is was successful or not and what was your hardware setup. i.e direct to modem or via a router.

Phoenix have just released a stand alone server application but I am still having the same problems with that.

Cheers

Ade_Law
10-08-2007, 05:23 AM
if you have a session running locally behind a router it will get advertsied to you twice. once through the lan once through the net. you have to connect to the lan session. others will connect to the internet session.

best bet is to contact phoenix they are very quick to reply

support@phoenix-sim.com

Ade

jrohland
10-08-2007, 02:16 PM
I setup a server called: Next! - Virginia USA in North America. I have tried to connect to it from the Internet side and it failed. I can connect to it locally.

Anyway, I will leave it up while I try to get it working.

I am guessing the server utility does not like having a NATed IP address. However, I am not willing to hang a server outside my firewall and, the DMZ is too much trouble.

jrohland

Ade_Law
10-08-2007, 02:35 PM
when your running a session on your lan you will not be able to connect to the advertised session, you will always have to connect to the local one. others will be able to connect the to the session tho.

i do this regularly with my flat mate.

its to do with how routers work, something i dont understand!

Ade

jrohland
10-08-2007, 02:53 PM
Ade,

If you have time, can you attempt to connect to my server?

I understand what you said about not being able to connect to yourself via the outside connection. However, my firewall deals with that issue. For example, I can connect to my Web server using the public IP. This works even though I am on the same LAN segment at the Web server. My firewall directs the traffic to a downstream router which sends it back via my public connection.

I assume, since all my other services (Web, email, etc.) work with my use of the public IP, the Phoenix connection should work that way as well.

jrohland

TasKiNG
10-10-2007, 04:01 PM
Thanks for your sugestions.
I have tried a different aproach. I now have a linux server connected to my cable modem. I am running the phoenix server utility on this using "wine".
I have also set up firestarter to provide internet connection sharing to allow me to connect to the net via my Windows XP machine.
Now I have the opposite problem. People can connect to me but there is no entry under LAN to allow me to connect.
I can connect to other peoples servers via my server pc but not phoenix on the lan.
Think its something to do with the Linux firewall but not fixed it yet :).
Im sure this would all work perfectly if i put windows on my server and enable ICS but I am determined to do it with Linux as this provides much better security.

Right off to have another go

Cheers

DbyMA
10-10-2007, 04:37 PM
You could always run a copy of Ethereal on both machines and review the network traffic. Is your Linux box talking NetBIOS with your Windows workgroup or domain?

Having said that, I'm still at a similar stage trying to get Phoenix server working through my security setup :)

Mac

TasKiNG
10-10-2007, 08:08 PM
Got it working - sort of. If I drop my firewall whilst I connect then start it again I can get on.
This makes me think that it dosent just use UDP ports 9000-9005 but may use a tcp/ip listener port to make the initial connection. I had a look though using ethereal ( wireshark ) as you suggested but coulden't spot anything to prove it.

wbplomp
10-19-2007, 10:39 AM
Got it working - sort of. If I drop my firewall whilst I connect then start it again I can get on.
This makes me think that it dosent just use UDP ports 9000-9005 but may use a tcp/ip listener port to make the initial connection. I had a look though using ethereal ( wireshark ) as you suggested but coulden't spot anything to prove it.

I am a Infrastructure Consultant (IT) and I'm dealing with these issues all day, so normally this shouldn't be a problem. So here I go, I have configured my router and etc. But the weird thing is... I can advertise my session but nobody can connect from the public network. I also got the feeling something else is going on. This beta service is obviosly not router-proof yet. I have not connected another firewall with advanced logging yet, but I will soon, to check what's wrong.

So... if you find anything, keep us updated.

TasKiNG
10-20-2007, 03:19 PM
For anyone who is interested, this is how I set up my Linux server for Phoenix

I had to do it this way as the Phoenix server application would not work with my router.
I was visible on PhoenixNet but nobody could connect to me.
I tried with ports 9000-9005 open (UDP) and also through a DMZ with no luck.

This however works fine:-

Basically I have a Server running Ubuntu Linux which has 2 network cards.
One (eth0 ) is set up to obtain ip addresses via DHCP and is connected to the Cable Modem.
The other (eth1) has a fixed IP address of 192.168.0.1 and is connected to a standard network Hub.

[Cable Modem]===eth0(DHCP)[Linux Server]eth1(192.168.0.1)===[HUB]===[Windows Client PC]

I have installed a DHCP daemon on the server so that hosts connected the the hub can obtain IP addresses via DHCP.
I have also set up Internet Sharing and a basic firewall using IPtables.

Server Setup
~~~~~~~~~~~~

ubuntu uses sudo for route access instead of allowing you to login as root.
root login can be allowed as follows :-

sudo passwd root
enter a password for root access.

iptables was setup as follows:-

logged on as "root", I first created a folder /etc/iptables and then created a rules file called iptables.rules
in this folder as follows :-

su root
enter root password

mkdir /etc/iptables
cd /etc/iptables/
gedit iptables.rules

I then entered the following in this file:-

# Generated by iptables-save v1.3.6 on Mon Oct 15 01:03:52 2007
*filter
:INPUT ACCEPT [24:3742]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [235:20135]
-A INPUT -i eth0 -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j DROP
-A INPUT -i eth0 -p tcp -m tcp --dport 0 -j DROP
-A INPUT -i eth0 -p tcp -m tcp --dport 1 -j DROP
-A INPUT -p icmp -m icmp --icmp-type 8 -j DROP
COMMIT
# Completed on Mon Oct 15 01:03:52 2007
# Generated by iptables-save v1.3.6 on Mon Oct 15 01:03:52 2007
*nat
:PREROUTING ACCEPT [406:22899]
:POSTROUTING ACCEPT [2:250]
:OUTPUT ACCEPT [2:250]
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT
# Completed on Mon Oct 15 01:03:52 2007

This will give you a very secure firewall with Internet connection sharing.

change file permissions as folows :-

chmod 755 /etc/iptables/iptables.rules

now install the DHCP daemon :-

As root enter the following:-

apt-get update
apt-get install dhcp

using gedit, edit the file /etc/dhcpd.conf and make sure it is as follows:-

# DHCP configuration
subnet 192.168.0.0 netmask 255.255.255.0 {
option routers 192.168.0.1;
option subnet-mask 255.255.255.0;
option domain-name-servers 194.168.4.100, 194.168.8.100;
option ip-forwarding off;
range dynamic-bootp 192.168.0.100 192.168.0.254;
default-lease-time 21600;
max-lease-time 43200;
}

Note the Above domain-name-servers are for my NTL connection. you will have to change these for your isp's

See list here for help:-
http://forum.portforward.com/YaBB.cgi?board=Routers;action=display;num=11154166 55

or try the command :-

dig | grep SERVER

All that remains now is to set up your interfaces and to make sure the iptables script runs at boot up.
you can do this as follows:-

as root, edit your /etc/network/interfaces file with gedit to be as follows:-

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
pre-up /sbin/iptables-restore < /etc/iptables/iptables.rules

auto eth1
iface eth1 inet static
address 192.168.0.1
netmask 255.255.255.0


Now Reboot your machine to enable changes

You should now be able to connect a machine to the hub and have Internet access on that machine.

Now the easy bit ( getting Phoenix server running on the server ).

As Phoenix dedicated server is a windows program you will have to install a program that allows it to be run in linux called Wine.
Install as follows:-

set user to root as above then type:-

apt-get update
apt-get install wine

On your windows machine you will need to install Phoenix, all updates and Phoenix server.
This will install into the directory C:\Program Files\PhoenixRC
Copy the C:\Program Files\PhoenixRC directory and its contents onto a CD or memory stick.

Now copy the phoenixRC folder onto your linux server into the directory /home/yourusername/.wine/drive_c/Program Files
(notice the dot before wine)
when done, Right-Click on the /home/yourusername/.wine/drive_c/Program Files/phoenixRC folder and select "Make Link".
Drag this link to your desktop. You can then click on this link to open the folder then double click on phoenixServer.exe
to run the server.

Don't be tempted to create a link on your desktop directly to phoenixServer.exe as when it runs, it will not pick up
the available flying sites.

Note: The reason for copying the whole phoenix installation to the server is because the dedicated Phoenix server
application uses certain files in the PhoenixRC folder.

That's it. It takes a little time to set up but being linux, you will have a rock solid and secure server.

When you run Phoenix on your Host machine and select multiplayer you should now see your server twice, In the Lan
section and in the Internet section.

Select your server in the Lan section and your away.

Ubuntu linux is free and can be downloaded here http://www.ubuntu.com/getubuntu/download

Have Fun

TasKiNG ( Dragonflies Linux Server )

trickybit
10-20-2007, 03:54 PM
can't you drop a cheap router/firewall between your linux box and the cable modem, and pinhole the ports you need to let through to the linux box?

saves some config, and administering two eth cards?

your one server instance will look like your external port to the outside world, and an internal port on the inside world. the little router will do your in-house dhcp.

one reason is that you can fart around w/ your ubuntu box, reboot it, etc. without taking down the dhcp/nat access for the rest of the computers in your house.

cheers, nice details tho, to be sure.

TasKiNG
10-20-2007, 04:25 PM
TrickyBit,

The reason I had to configure it this way was because I could not get Phoenix dedicated Server application to work properly through a router. I tried 2 routers, one M0n0wall and one Belkin and I was visible on PhoenixNet but no one could connect.
This was not a port issue as I had unblocked Ports 9000-9005 to both UDP and TCP.
I even set up a DMZ for the server but still had the same problem.
It seems that there are others having the same problems with Phoenix Server and Routers so thought I would share the solution which worked for me.

Cheers

TasKiNG

jrohland
10-20-2007, 06:19 PM
I have something similar to TasKiNG.

I have not been able to get Phoenix server to work when it runs on a machine with a NATed (or, at least private) IP address. So, here is what I did:

See the diagram; Windows XP runs VMWare Server for Windows. VMWare runs two Ubuntu virtual machines (VMs). In Ubuntu I run Wine which runs Phoenix server.

I have multiple public IP addresses. Two of those addresses are assigned one each to the two Ubuntu machines. The VMs talk to a network interface card (NIC) which is attached to the DMZ port on the firewall. That VM NIC does not have a network stack on the Windows host. This means the DMZ can't reach the Windows host.

The Windows host can only talk to the LAN and the VMs can only talk to the DMZ. This secures the LAN from the DMZ even though the VMs are running on top of a Windows host which is attached to the LAN.

Rules in the firewall allow only UDP ports 9000-9005 and ICMP (PING) to pass to the DMZ interface. As such, the Ubuntu machines are well protected from the outside.

Bottom line, I am running two Phoenix servers (for two flying venues) on two virtual Ubuntu servers using one Windows physical computer. Nice!

http://www.helifreak.com/attachment.php?attachmentid=28919&stc=1&d=1192918228

jrohland

trickybit
10-21-2007, 03:58 PM
groovy, thanks. the server probably announces its (internal) IP, kind of like SIP.

TasKiNG
10-25-2007, 04:09 PM
Please note that in my post on how to set up a dedicated Linux Phoenix Server below, I forgot to add a few lines of commands. As I do not seem to be able to edit my post now, please note that you also need to issue the following commands as user root:-

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward

gedit /etc/sysctl.conf
add the line:-

net.ipv4.ip_forward = 1

you should type all this after the command before the section on how to install the DHCP daemon.