Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Guide: Get heRO to work on Linux
Author Message
TPC Offline
I like pie
****

Posts: 591
Joined: Jan 2007
Post: #1
Guide: Get heRO to work on Linux

Hey guys, I've been using hero on linux for a while. It works great for me once its set up. The setting up involves working around the bug that makes the connection to the server fail. I saw in another post that some people were having trouble getting it to work under linux, so here is a guide on how to do it so we can play on heRO while using our favorite operating system. Icon_wink
Its a bit complicated, but not that hard once you've done it once.

The connection fails because its trying to connect to the wrong ip. So what you do is instruct the linux firewall to redirect all connections from the wrong ip to the right ip.

1. Install hero using wine normally, the full installer with bgm has no problems in the latest versions of wine.

2. Use a GRF extractor to extract sclientinfo.xml from the hero grf (grf factory was the one I used I think), it will contain among other things a host to the hero game server. I won't post the host here since I don't think the GMs would want that, and if they change it at some point it would make this guide outdated.

3. Resolve the host to an ip at the terminal, for example:

$ host hero-host.com
hero-host.com??????????????A?????? 1.1.1.1

except with the real hero host instead of hero-host.com. Write down the ip you get.

4. Now we have the ip to redirect to, now we have to find the one to redirect from. This is different for everyone, so I can't post mine, since it won't work for you. This is how you find it. First install the connection sniffing program called ettercap.

5. Turn off as many programs as you can that uses the network to avoid a flood of connection inside the sniffing program (makes it hard to find the right connection). Start ettercap as root (use sudo if you're on ubuntu) like this:
$ ettercap --curses

6. In the menu in ettercap chose the menu sniff -> unified sniffing. A dialog box comes up, most likely you can just press enter to choose the default. Then go to the menu start and choose start sniffing. Then go into the menu view and choose connections. Now open hero (with wine heRO.exe in the hero folder) and try to connect. The hero-connection will pop up in the sniffer program. Write down the ip it tries to connect to. You will probably have a few other connections pop up as well, the ip you want is the one connecting to one of the ports hero uses (6901, 6122, 5122). For the sake of this guide we will say that you got the ip 2.2.2.2 but this is different for everyone.

7. Now to instruct the linux firewall to redirect all traffic from two 2.2.2.2 to 1.1.1.1 (replace with the real ips of course) you'll have to run this command as root:
$ iptables -t nat -A OUTPUT -d 2.2.2.2 -j DNAT --to 1.1.1.1

And then you can start heRO.exe again and the game connects and works fine. Icon_biggrin

Note that the hero ip/host may change, not often, but it has happened. So if this stops working you'll have to update the client and extract the new host. And the "wrong" ip it tries to connect to changes every time you reboot, so you'll have to do this again every time you reboot. But hey, we linux users only reboot once or twice a year anyway, right? Icon_twisted

Post if you have any questions.

Edit: With recent wine versions the ip doesn't seem to change on reboot or updates anymore, so you can just write it down once and you'll have it forever. Makes things a bit easier Icon_biggrin

My chars: TPC / Tjuven / Dansare / Sinne / Magiker / Byracka / Krigare / Andreas
(This post was last modified: 07-18-2010 11:48 PM by TPC.)
11-07-2009 05:02 PM
Find all posts by this user Quote this message in a reply
Kirby_Z Offline
The Kirbster
****

Posts: 624
Joined: Jan 2008
Post: #2
RE: Guide: Get heRO to work on Linux

Thanks ^_^

Will try it but if I have to change the redirect ip on each reboot then it wont be usefull for me, since I have to shutdown the PC when not using it.

Proud Member Of The Nya Nya Crew
[Image: nyanya.jpg][Image: 51000806.png]
Nya Nya Crew - ¥†‡ Hero's #1 Social Non Woe Guild ‡†¥
11-07-2009 05:58 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump: