SRCDS Steam group


Server redirect
#1
hi guys. I want to redirect my oldest css server ip to new ip. But i couldnt find needless plugin Sad. There are some plugins on sourcemod site but they are not redirecting while connect to server. ( i dont want press F3 bla bla, i want to redirect to new ip while connect oldest ip )

thanks.
Reply
#2
Don't think you will find such plugin.

Just lock it up, and set the hostname to something like "Moved to: xxx.xxx.xxx.xxx"
Reply
#3
pff i want to use amxmodx on srcds Big Grin there are lots of plugin for redirect in amxmodx Big Grin
Reply
#4
Then why ask? And not just use them?
Reply
#5
my server ip has changed so i asked this.
Reply
#6
There will be no plugin that will allow redirection without the "Press F3". Valve made it this way now.
Reply
#7
I know that i am a dumbass for telling you to use mani, but it has a function which automatically redirects you to another server if the current server er full
Slå den med jeres fiberforbindelser...

[Image: 1308107839.png]
Reply
#8
(03-10-2010, 05:59 PM)lol554 Wrote:  I know that i am a dumbass for telling you to use mani, but it has a function which automatically redirects you to another server if the current server er full

Automatical redirects are not working since long time ago when Valve released some patch. It's not possible to redirect players unless they press F3. It's not about which plugin you use, it's just not possible. NOT POSSIBLE.

But then again, impossible is nothing. Here's how you can redirect players on a Linux server. In your case this probably works very well.

Code:
iptables -t nat -I PREROUTING -p udp --dport 27015 -j DNAT --to-destination 1.2.3.4:27016

This will make any server look like it's at 1.2.3.4:27016. For example I could run the command on my computer and then it would look like there's the 1.2.3.4:27016 server on my computer although I don't have server on my computer at all.

Let me know if it works.

Note, if you try and test this, then it may get bit weird if the connections are not going as you expected. Linux kernel has timeout for all connections it has seen. That's why only new connections go through the iptables' nat table. If you've had connection to your old server earlier, then the rule doesn't work. You can go around it by this:

Code:
echo 0 >/proc/sys/net/ipv4/netfilter/ip_conntrack_udp_timeout
echo 0 >/proc/sys/net/ipv4/netfilter/ip_conntrack_udp_timeout_stream

This is experimental, which may be obvious at this point Wink

PS. Somebody with some Linux skills could turn this to normal player redirect by adding "-s 9.8.7.6" to the iptables rule + using "retry" command on the server simultaneously.
Reply
#9
(03-10-2010, 06:24 PM)css Wrote:  
(03-10-2010, 05:59 PM)lol554 Wrote:  I know that i am a dumbass for telling you to use mani, but it has a function which automatically redirects you to another server if the current server er full

Automatical redirects are not working since long time ago when Valve released some patch. It's not possible to redirect players unless they press F3. It's not about which plugin you use, it's just not possible. NOT POSSIBLE.

But then again, impossible is nothing. Here's how you can redirect players on a Linux server. In your case this probably works very well.

Code:
iptables -t nat -I PREROUTING -p udp --dport 27015 -j DNAT --to-destination 1.2.3.4:27016

This will make any server look like it's at 1.2.3.4:27016. For example I could run the command on my computer and then it would look like there's the 1.2.3.4:27016 server on my computer although I don't have server on my computer at all.

Let me know if it works.

Note, if you try and test this, then it may get bit weird if the connections are not going as you expected. Linux kernel has timeout for all connections it has seen. That's why only new connections go through the iptables' nat table. If you've had connection to your old server earlier, then the rule doesn't work. You can go around it by this:

Code:
echo 0 >/proc/sys/net/ipv4/netfilter/ip_conntrack_udp_timeout
echo 0 >/proc/sys/net/ipv4/netfilter/ip_conntrack_udp_timeout_stream

This is experimental, which may be obvious at this point Wink

PS. Somebody with some Linux skills could turn this to normal player redirect by adding "-s 9.8.7.6" to the iptables rule + using "retry" command on the server simultaneously.

Well i have been testing a new dellserver at home which became very populated, and now i am moving it into my colocenter, so i would be happy to test it out Smile
Slå den med jeres fiberforbindelser...

[Image: 1308107839.png]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)