LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-03-2002, 11:45 AM   #16
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58

No I never had that problem, I was using RedHat 6.1 with ipchains, ipmasqadm, and a 2.2x kernel.

Now I use RedHat 7.1, 2.4.9-31 kernel, and iptables.


It should not take that long to load a map, and I don't think it should stop networking during the process.

try running top to see what happens with the memory and cpu while the server changes maps.

Also have another machine just pinging the server from the internet with a long timeout, and see what the pings go up to


Also you can check performance by running net_graph 1 on a client

Last edited by DavidPhillips; 04-03-2002 at 11:48 AM.
 
Old 05-02-2002, 08:29 AM   #17
DiMenSioN
LQ Newbie
 
Registered: Mar 2002
Location: Holland
Distribution: Mandrake 8.2
Posts: 11

Rep: Reputation: 0
Found it

its working now,

if the clients set their cl_timeout value higher and if the server runs with a -20 priority it works fine. The only problem is that when it is mapchanging the routing processes dont get enough cpu so inet on the client pc's gets realy laggy (the server is also a router).

So im considering running another pc as server. My question problem is that i cant get ports forwarded, i dont know how to do it. This problem causes lots of inet-functions on clients pc to stop working (HLDS is one of them). Could you tell me how to portforward under linux?

Thank you very much

DiMenSioN
 
Old 05-02-2002, 11:16 PM   #18
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
Here is an example of how to forward TCP port 15101




Open the port you want to use

iptables -A OUTPUT -i eth0 -p tcp --dport 15101 -j ACCEPT
iptables -A FORWARD -i eth0 -p tcp --dport 15101 -j ACCEPT

Forward the port to the other machine

iptables -t nat -A PREROUTING -i eth0 -p TCP --dport 15101 -j DNAT --to 192.168.0.2:15101
 
Old 05-04-2002, 02:18 PM   #19
DiMenSioN
LQ Newbie
 
Registered: Mar 2002
Location: Holland
Distribution: Mandrake 8.2
Posts: 11

Rep: Reputation: 0
THanks for the answer

I have the pc as a router so how do i do it then?

my clientpc's are connected to eth1, the internet modem is connected to eth0, client ip's are 192.168.0.2-192.168.0.5, my internet ip is 217.120.71.225, could you please give me the line that i have to use then?

And wat lines do i put in the rc.local, to make it forward every time it boots?

Thank u

DiMenSioN
 
Old 05-05-2002, 05:52 PM   #20
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
Where is the server?


first run hlds and see if you get connected..


You should get "WON Auth"

and not "Auth Server"


if you don't get that then you need to open some ports


iptables -A tcp_packets -p tcp -m tcp --dport 27010 -j allowed
iptables -A tcp_packets -p udp -m udp --dport 27010 -j allowed
iptables -A tcp_packets -p tcp -m tcp --dport 27015 -j allowed
iptables -A tcp_packets -p udp -m udp --dport 27015 -j allowed



here's a list


// Server Lists
//
Titan
{
half-life.east.won.net:6003
half-life.west.won.net:6003
half-life.central.won.net:6003
}

Auth
{
half-life.east.won.net:7002
half-life.west.won.net:7002
half-life.central.won.net:7002
}

Master
{
half-life.east.won.net:27010
half-life.west.won.net:27010
half-life.central.won.net:27010
}

ModServer
{
half-life.east.won.net:27011
half-life.west.won.net:27011
half-life.central.won.net:27011
}

Secure
{
half-life.speakeasy-nyc.hlauth.net:27012
half-life.speakeasy-sea.hlauth.net:27012
half-life.speakeasy-chi.hlauth.net:27012
}


you may want to use these, if so add the ones you need


iptables -A tcp_packets -p tcp -m tcp --dport 27011 -j allowed
iptables -A tcp_packets -p udp -m udp --dport 27011 -j allowed

iptables -A tcp_packets -p tcp -m tcp --dport 27012 -j allowed
iptables -A tcp_packets -p udp -m udp --dport 27012 -j allowed

iptables -A tcp_packets -p tcp -m tcp --dport 6003 -j allowed
iptables -A tcp_packets -p tcp -m tcp --dport 7002 -j allowed



once you get WON Auth when the server is started you need to forward the port the server is on


default is 27015

iptables -A PREROUTING -d 217.120.71.225 -p tcp -m tcp --dport 27015 -j DNAT --to-dest
ination 192.168.0.2:27015




or maybe this

iptables -t nat -A PREROUTING -d 0/0 -p tcp --destination-port 27015 -i eth0 -j DNAT --to 192.168.0.2

Last edited by DavidPhillips; 05-05-2002 at 06:38 PM.
 
Old 06-24-2002, 03:12 AM   #21
horsepower300
LQ Newbie
 
Registered: Jun 2002
Posts: 22

Rep: Reputation: 15
Why do i never get these hlds problems and i run booster metamod and about 3 plugins!
 
Old 06-24-2002, 05:59 AM   #22
DiMenSioN
LQ Newbie
 
Registered: Mar 2002
Location: Holland
Distribution: Mandrake 8.2
Posts: 11

Rep: Reputation: 0
Question problems

well, i figured that is the port forwarding of the server. Its becauze im trying to run a server behind a linux router. The ports that the server use are not forwarded.

Its not only the Hl port thats not forwarded it are alot of em, for example i cant sent files with msn, icq or irc. I cant talk to people through msn.

So could someone plzz tell me how to forward those ports, i dont need to know what ports they are, i can find that out. I need an example of a commando how to forward a port.

For example:
Linux router internet ip: 213.51.6.99
linux router local ip:192.168.0.1
client pc local ip: 192.168.0.4
I want to run a server on the client pc. there for i need to forward port 27015.
what would the commandline look like then?

Thanks

DiMenSioN
 
Old 06-24-2002, 03:42 PM   #23
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
Quote:
Originally posted by DavidPhillips
Here is an example of how to forward TCP port 15101




Open the port you want to use

iptables -A OUTPUT -i eth0 -p tcp --dport 15101 -j ACCEPT
iptables -A FORWARD -i eth0 -p tcp --dport 15101 -j ACCEPT

Forward the port to the other machine

iptables -t nat -A PREROUTING -i eth0 -p TCP --dport 15101 -j DNAT --to 192.168.0.2:15101
 
Old 06-25-2002, 06:50 AM   #24
DiMenSioN
LQ Newbie
 
Registered: Mar 2002
Location: Holland
Distribution: Mandrake 8.2
Posts: 11

Rep: Reputation: 0
Open the port you want to use

iptables -A OUTPUT -i eth0 -p tcp --dport 15101 -j ACCEPT
iptables -A FORWARD -i eth0 -p tcp --dport 15101 -j ACCEPT

Forward the port to the other machine

iptables -t nat -A PREROUTING -i eth0 -p TCP --dport 15101 -j DNAT --to 192.168.0.2:15101

thank u for the info.

I tried this but it doesnt work.

It says u cant use "-i" with an OUTPUT command, so I left -i and eth0 out of the line and it did work.
The other commandlines did all work.

I used the 3 lines to forward port 6891 which is used by msn to transfer files. Apparently the port wassent forwarded after i use these 3 lines because i couldnt sent with msn.

It might be because i have 2 ehternet cards in the router, eth0 is connected to the internet and eth1 is connected to the home lan. Can U tell me how the lines would look if u take that in account?


DiMenSioN


 
Old 06-25-2002, 02:50 PM   #25
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
Not sure where I got the i eth0 on the OUTPUT chain from, something I copied from somewhere I guess.

The good news is msn is a known problem

msn uses a random port

Raz has posted this rule as a fix for it.

-------------------------------------------------------
by Raz
Quote:

I've tested this and have no problems once you use the correct rules in your firewall.

The output rule from your external IP address should allow your IP to send from ports 1023:65535 to destination
port of 1863 any IP address.

Your input rule to your external IP address should allow your IP to receive only a SYN flag with a source port of
1863 to a destination port of 1023:65525 from the IP range 64.4.13.0/24

UDP is not needed only TCP.

An example of an Linux IPchains rule would look like this:
The example external IP address is 64.45.11.23

ipchains -A output -p tcp -s 64.45.11.23 1023:65535 --dport 1863 -j ACCEPT
ipchains -A input -p tcp ! -y -s 64.4.13.0/24 --sport 1863 -d 64.45.11.23 1023:65535 -j ACCEPT


Last edited by DavidPhillips; 06-25-2002 at 02:54 PM.
 
Old 06-25-2002, 03:03 PM   #26
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
There may be other related firewall issues to consider with msn.

see this post, I think it clears up all the issues.

http://www.linuxquestions.org/questi...3072#post13072
 
Old 06-25-2002, 03:07 PM   #27
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
With all this said. It just might not work if anything changes, Who knows? Microsoft is probably doing it intentionally because they are stupid.

The most reasonable thing to do would be to setup an ftp server or http server and transfer files by sending a link to them.
 
Old 06-25-2002, 03:13 PM   #28
DiMenSioN
LQ Newbie
 
Registered: Mar 2002
Location: Holland
Distribution: Mandrake 8.2
Posts: 11

Rep: Reputation: 0
Wink

im sorry, but i dont realy understand that line, there are two ip adresses in there, what is ment with the external?
Is the external the ip that i use for my router to connect to the inet?
And what is that seccond ip?

theres another problem, because i use iptables, i cant use ipchains, so what would the line look like then??

I know im getting a bit anoyin, im sorry but i would like it to work.


thanks

DiMenSioN
 
Old 06-25-2002, 05:19 PM   #29
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
The ip ending in .0/24 is for the network you want to allow from.

The external ip is your routers internet ip

That is the first part of the rules allowing access from the msn server to the ports on the router.

Follow the link for the other info, it seems to be an issue still undecided.

Last edited by DavidPhillips; 06-25-2002 at 05:26 PM.
 
Old 06-25-2002, 05:24 PM   #30
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
I looked at all this a while back and decided two things, It's too many ports to forward and it would pretty much defeat the purpose of what I have setup for my router. And it's not as good as ftp.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Implications when giving out a shell account to execute halflife server scripts nistelrooy Linux - General 4 02-24-2006 12:00 AM
Halflife Server wonderwally Linux - Software 3 04-03-2004 02:11 PM
Halflife server won't go secure! horsepower300 Linux - Newbie 4 07-23-2003 01:26 PM
making halflife server start at boot up progster Linux - Software 2 07-20-2002 07:06 AM
weird halflife server problem k3v0 Linux - General 2 07-05-2002 10:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:03 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