Monthly Archives: October 2012

Infrared Photography

Here’s a gallery of some of my better Infrared Shots. Enjoy!

 

 

 

How to configure a shoutcast relay server in ubuntu

So you want to relay your favorite shoutcast stream with your ubuntu VPS, but don’t know where to start? Here’s a quick guide to relaying DNAS v1.9.8 shoutcast server streams.

Step 1: Download the sc_serv_1.9.8 file from this thread, or from another website (afterdawn, shoutcast.com, etc)

sc_serv_1.9.8_Linux.tar.gz

Step 2: Unzip the .zip and .tar, and FTP them to your server. I use /var/shoutcast for my folder root, but that might not be the most secure. You could use /home/shoutcast or anything really.

Step 3: If you are going to run the server as root (not recommended) you can skip this. Otherwise, make an account (ex. shoutcast) and place the files into a folder in their home.

Step 4: Edit the sc_serv.conf using nano or vi. Edit any and all settings that you find fit. Here is what I have mine set as.

[spoiler]

; SHOUTcast Distributed Network Audio Server configuration file
; Copyright (C) 1998-2004 Nullsoft, Inc.
; All Rights Reserved.
; Last modified Mar 17 2004

; If you want to manage multiple configurations, just copy
; this file to another name, and run sc_serv with that name
; such as:
; sc_serv.exe sc_leet.conf

; ***************************
; Required stuff
; ***************************

; MaxUser.  The maximum number of simultaneous listeners allowed.
; Compute a reasonable value for your available upstream bandwidth (i.e. if
; you have 256kbps upload DSL, and want to broadcast at 24kbps, you would
; choose 256kbps/24kbps=10 maximum listeners.)  Setting this value higher
; only wastes RAM and screws up your broadcast when more people connect
; than you can support.
MaxUser=100

; Password.  While SHOUTcast never asks a listener for a password, a
; password is required to broadcast through the server, and to perform
; administration via the web interface to this server.  This server should
; consist of only letters and numbers, and is the same server your broadcaster
; will need to enter in the SHOUTcast Source Plug-in for Winamp.  THIS VALUE
; CANNOT BE BLANK.
Password=************

; PortBase. This is the IP port number your server will run on.  The
; value, and the value + 1 must be available.  If you get a fatal error when
; the DNAS is setting up a socket on startup, make sure nothing else on the
; machine is running on the same port (telnet localhost portnumber — if you
; get connection refused then you’re clear to use that port).  Ports < 1024
; may require root privledges on *nix machines.  The default port is 8000.
PortBase=8100

; ***************************
; Optional Parameters
; ***************************

; ***************************
; Logging configuration
; ***************************

; LogFile: file to use for logging. Can be ‘/dev/null’ or ‘none’
; or empty to turn off logging. The default is ./sc_serv.log
; on *nix systems or sc_serv_dir\sc_serv.log on win32.
; Note: on win32 systems if no path is specified the location is
; in the same dir as the executable, on *nix systems it is in the
; current directory.
LogFile=sc_serv.log

; RealTime displays a status line that is updated every second
; with the latest information on the current stream (*nix and win32
; console systems only)
RealTime=1

; ScreenLog controls whether logging is printed to the screen or not
; on *nix and win32 console systems. It is useful to disable this when
; running servers in background without their own terminals. Default is 1
ScreenLog=1

; ShowLastSongs specifies how many songs to list in the /played.html
; page.  The default is 10.  Acceptable entries are 1 to 20.
ShowLastSongs=10

; TchLog decides whether or not the DNAS logfile should track yp
; directory touches.  Adds and removes still appear regardless of
; this setting.
; Default is yes
; TchLog=yes

; WebLog decides whether or not hits to http:// on this DNAS will
; be logged.  Most people leave this off because the DSP plug-in
; uses http:// calls to update titles and get the listener count,
; which takes up a lot of log space eventually.  If you want to
; see people making hits on your admin.cgi or index pages, turn
; this back on.  Note that this setting does NOT affect XML stats
; counters for hits to http:// pages.
; Default is no.
; WebLog=no

; W3CEnable turns on W3C Logging.  W3C logs contain httpd-like accounts
; of every track played for every listener, including byte counts those listeners
; took.  This data can be parsed with tools like Analog and WebTrends, or given
; to third parties like Arbitron and Measurecast for their reporting systems.
; Default is Yes (enabled).
W3CEnable=Yes

; W3CLog describes the name of the logfile for W3C logging.  Default logfile is
; sc_w3c.log, in the same directory wherever the DNAS gets started from.
W3CLog=sc_w3c.log

; ***************************
; Network configuration
; ***************************

; SrcIP, the interface to listen for source connections on (or to make relay
; connections on if relaying). Can and usually will be ANY or 127.0.0.1
; (Making it 127.0.0.1 will keep other machines from being able to
; broadcast using your shoutcast server )
SrcIP=ANY

; DestIP, IP to listen for clients on (and to contact yp.shoutcast.com)
; can and usually will be be ANY. If your machine has multiple IP addresses,
; set this to the one you want it to be accessed by.
DestIP=ANY

; Yport, port to connect to yp.shoutcast.com on. For people behind caching
; webproxies, change this to the alternate port (666 is what it might be,
; check www.shoutcast.com if you have problems). Otherwise, leave this at 80.
; We’re actively working on re-opening port 666, but as of release the only
; working port is port 80.
Yport=80

; NameLookups.  Specify 1 to perform reverse DNS on connections.
; This option may increase the time it takes to connect to your
; server if your DNS server is slow.  Default is 0 (off).
NameLookups=0

; RelayPort and RelayServer specify that you want to be a relay server.
; Relay servers act as clients to another server, and rebroadcast.
; Set RelayPort to 0, RelayServer to empty, or just leave these commented
; out to disable relay mode.
RelayPort=8000
RelayServer=stream1.yourfavoritestream.com

; ***************************
; Server configuration
; ***************************

; AdminPassword.  This password (if specified) changes the
; behavior of Password to be a broadcast-only password, and
; limits HTTP administration tasks to the password specified
; here.  The broadcaster, with the password above, can still
; log in and view connected users, but only the AdminPassword
; will grant the right to kick, ban, and specify reserve hosts.
; The default is undefined (Password allows control for both
; source and admin)
; AdminPassword=************

; AutoDumpUsers controls whether listeners are disconnected if the source
; stream disconnects. The default is 0.
AutoDumpUsers=0

; AutoDumpSourceTime specifies how long, in seconds, the source stream is
; allowed to be idle before the server disconnects it. 0 will let the source
; stream idle indefinately before disconnecting. The default is 30.
AutoDumpSourceTime=30

; ContentDir specifies the directory location on disk of where to stream
; on-demand content from.  Subdirectories are supported as of DNAS 1.8.2.
; Default is ./content, meaning a directory named content in the same directory
; as where sc_serv was invoked from.
; ContentDir=./content

; IntroFile can specify a mp3 file that will be streamed to listeners right
; when they connect before they hear the live stream.
; Note that the intro file MUST be the same samplerate/channels as the
; live stream in order for this to work properly. Although bitrate CAN
; vary, you can use ‘%d’ to specify the bitrate in the filename
; (i.e. C:\intro%d.mp3 would be C:\intro64.mp3 if you are casting at 64kbps).
; The default is no IntroFile
; IntroFile=c:\intro%d.mp3

; BackupFile can specify a mp3 file that will be streamed to listeners over
; and over again when the source stream disconnects. AutoDumpUsers must be
; 0 to use this feature. When the source stream reconnects, the listeners
; are rejoined into the live broadcast.
; Note that the backup file MUST be the same samplerate/channels as the
; live stream in order for this to work properly. Although bitrate CAN
; vary, you can use ‘%d’ to specify the bitrate in the filename
; (i.e. C:\backup%d.mp3 would be C:\backup32.mp3 if you are casting at 32kbps).
; The default is no BackupFile
; BackupFile=C:\intro%d.mp3

; TitleFormat specifies a format string for what title is sent to the listener.
; For example, a string of ‘Justin Radio’ forces the title ‘Justin Radio’ even
; when the source changes the title. You can use up to one ‘%s’ in the string
; which lets you contain the title from the source. For example, if your
; TitleFormat is ‘Justin Radio: %s’, and the source plug-in’s title is
; ‘Billy plays the blues’, then the net title is
; ‘Justin Radio: Billy plays the blues’. Note: only works on non-relay servers.
; The default is no format string.
; TitleFormat=Justin Radio: %s

; URLFormat specifies a format string for what url is sent to the listener.
; Behaves like TitleFormat (see above).
; The default is no format string.
; URLFormat=http://www.server.com/redirect.cgi?url=%s

; PublicServer can be always, never, or default (the default, heh)
; Any setting other than default will override the public status
; of the source plug-in or of a SHOUTcast server that is being relayed.
PublicServer=default

; AllowRelay determines whether or not other SHOUTcast servers will be
; permitted to relay this server.  The default is Yes.
AllowRelay=Yes

; AllowPublicRelay, when set to No, will tell any relaying servers not
; to list the server in the SHOUTcast directory (non-public), provided
; the relaying server’s Public flag is set to default.  The default is
; Yes.
AllowPublicRelay=Yes

; MetaInterval specifies how often, in bytes, metadata sent.
; You should really leave this at the default of 8192, but the option is
; provided anyway.
MetaInterval=32768

[/spoiler]

The main things that I changed were maxlisteners (set to 100), the passwords, and the relay information.

For the relay, you need the port of the stream, as well as the address. To find this information you must open the listen.pls and find the data in there.

*If you are going to run more than 1 server at a time, you will need to change the portbase. I run my streams at 8100 and 8200.

Step 5:

Now that you have configured your server, ssh in and cd to the appropriate folder. To start the server type

./sc_serv sc_serv.conf

It will now start!

If all goes well, the server will pick up the stream, and start relaying. Shoucast will do some magic, and you will soon be taking some of the load off of the main stream and onto yours. Contact the stream owner ahead of time so you can coordinate reserved slots in their streams.

If you have any questions, please leave them below. Remember, this only works with version 1.9.8!

Tutorial | How to make a high jump / low gravity server COD4

I spent a lot of time researching how to run a high jump or low gravity cod4 server, and I found a somewhat good solution to it. What follows is my duct-tape solution. 😀

**THIS ONLY WORKS FOR LEGIT SERVERS RUNNING PUNKBUSTER**

Once you have a functioning COD4 server, add this to the last line of your server.cfg

//Low Gravity
wait 1
exec lowgravity.cfg

Then make a new file and call it lowgravity.cfg

enter the following into it (you can change the parameters to suite your needs)

pb_sv_taskempty
jump_height 330
g_gravity 300
bg_fallDamageMinHeight 10000
bg_fallDamageMaxHeight 10000
pb_sv_task 30 30 “g_gravity 300”
pb_sv_task 30 30 “jump_height 330”
pb_sv_task 30 30 “bg_fallDamageMinHeight 10000”
pb_sv_task 30 30 “bg_fallDamageMaxHeight 10000”

That should work. I know that there is another way to do it, but I haven’t been able to coax it out of the server owner!

This will enable high jump / low gravity on your ranked COD4 server WITHOUT enabling cheats. Hopefully you can get some enjoyment out of it. If you have any suggestions or other ideas, please let me know below. Happy fragging!

How to have a high xp server in fourDeltaOne (mw2)

Some of you may be wondering how you can get your own high xp server in fourDeltaOne MW2. Here is a simple guide for the process.

First you will need a good, clean server.cfg . Here is one that I use for my high xp servers.

[spoiler]

// — QUERY INFORMATION ——————————–

set sv_hostname “server name!”

// optional settings returned by ‘serverinfo’ command
sets _Admin “”
sets _Email “”
sets _Website “”
sets _Location “”

// — NON-GAMEPLAY CONFIGURATION ———————–

set rcon_password “***********”
set sv_privatePassword “”
set privateMatch_serverPassword “”

set sv_maxPing “999”

set g_inactivity “180”
set g_inactivitySpectator “0”

set g_logSync “1”
sv log_damage “0”
set g_log “games_mp.log”

set aiw_sayName “^7Console”

set scr_teambalance “1”
set scr_player_maxhealth “25”
set scr_dm_score_kill “1000”

// — BASE GAME CONFIGURATION ————————–

set g_hardcore “1”
set ui_hud_hardcore “1”
set scr_hardcore “1”

//set scr_team_fftype “0”
set scr_player_healthregentime “0”

set g_speed “190”

set scr_thirdperson “0”

set scr_game_hardpoints “1”
set scr_game_perks “1”
set scr_game_spectatetype “1”
set scr_game_allowkillcam “1”

set scr_diehard “0”

// — GAMETYPE CONFIGURATION —————————

// – FFA

set scr_dm_scorelimit “45000”
set scr_dm_timelimit “20.0”

set scr_dm_playerrespawndelay “-1”

set scr_dm_numlives “0”
set scr_dm_promode”0″

// – Team Deathmatch

set scr_war_scorelimit “150000”
set scr_war_timelimit “20.0”

set scr_war_playerrespawndelay “-1”
set scr_war_waverespawndelay “0”

set scr_war_numlives “0”
set scr_war_promode “0”

set scr_war_roundlimit “1”
set scr_war_winlimit “1”

// — AUTOMATED ROTATION ——————————-

set sv_mapRotation “gametype dm map mp_rust”

[/spoiler]

In case you missed it, the key parameter added was…

set scr_dm_score_kill “1000”

That will set FFA scores to 1000 per kill. you can change it to set scr_war_score_kill”1000″ to do it for TDM, and you can figure out the rest. Make sure to use a clean simple config though, as it may crash your server if you don’t. Good luck!

fourdeltaone mw2 rcon hacked?

Apparently there is a way to exploit rcon in cod4/mw2 servers where the hacker is able to retrieve the server.cfg file remotely and then in turn get the rcon password. Then they can do whatever they want. Here is my solution to that problem.

1) Take your server down
2) change your rcon password in the server.cfg
3) rename your server.cfg file to something else (ex. 213456789.cfg)
4) edit your shortcut so it says exec 213456789.cfg instead of server.cfg
5) start up the server. the hacker will need to know the file name of the config, which will be nigh impossible to guess. After doing these steps the hackers stopped attacking my servers.

Reply below if you used this method and are still having problems!

Tutorial | How to install fourDeltaOne dedicated server

For this tutorial you will need:

Steam modernwarfare 2 files
fourDeltaOne client files from here
fourDeltaOne dedicated server updater which can be found here
Microsoft .NET Framework 3.5

Once you have these files, you’re ready for the fun stuff!

Step 1.
Make a new copy of your mw2 steam folder. Name it something useful, such as “FD1 Server”

Step 2.
Run the client installer, making sure to select the folder where the server is (C:/FD1 Server/)

Step 3.
Place the files from dsut.zip into the root folder of your server install (C:/FD1 Server/)
Run the iw4m_updater.exe and let it download the files.

Step 4.
Navigate to your C:/users/(your name) /appdata/local/iw4m/ and copy all of the files into your server folder (C:/FD1 Server/)


what your server folder should now look like

 

Step 5.
Make a shortcut to iw4m.exe on your desktop. If you don’t have one, rename the iw4m.dat to exe. Add the following parameters ( -dedicated +set party_maxplayers 18+set net_port 28961 +exec server.cfg +map oilrig +map_rotate) to the shortcut if you want an 18 player server running on port 28961 using the server.cfg that you have configured, loading OilRig as the map.

Step 6.
At this point your server should be functional. But we still need a few more things, such as a server.cfg. Here is an example of a server.cfg. remember to change the things you want different. Place this in C:/FD1/Main/

[spoiler]

// — QUERY INFORMATION ——————————–
set sv_hostname “I am Lazy”

// optional settings returned by query, server listings may use this
sets _Admin “NTAuthority”
sets _Email “ntauthority@example.com”
sets _Website “http://alteriw.net/”
sets _Location “EU – West”

// — NON-GAMEPLAY CONFIGURATION ———————–
set rcon_password “” // password for rcon, empty = disabled
set privateMatch_serverPassword “” // game password, leave empty for a public game

set sv_maxPing “300” // maximum ping, any higher and players will get kicked

set g_inactivity “0” // time in seconds before a player gets kicked if not moving
set g_inactivitySpectator “0” // time in seconds before a spectator gets kicked

set g_logSync “1” // 1 = always flush games_mp.log, 0 = only flush on game end
set g_log “games_mp.log” // game log file

set aiw_sayName “^7Console” // name server-side ‘say’ commands show up as

// — BASE GAME CONFIGURATION ————————–
set g_gametype “sd” // game type
// war – Team Deathmatch
// dm – Free-for-all
// dom – Domination
// koth – Headquarters
// sab – Sabotage
// sd – Search and Destroy
// arena – Arena
// dd – Demolition
// ctf – Capture the Flag
// oneflag – One-Flag CTF
// gtnw – Global Thermo-Nuclear War

// uncomment below commands for some hardcore shit
//set g_hardcore “1”
//set ui_hud_hardcore “1”
//set scr_hardcore “1”
//set scr_player_maxhealth “30”
//set scr_team_fftype “1” // 1 = on, 2 = reflect, 3 = shared
//set scr_player_healthregentime “0”

set scr_thirdperson “0” // third-person mode
set scr_game_hardpoints “1” // killstreaks, 1 = on
set scr_game_perks “1” // perks, obviously

set scr_game_allowkillcam “1” // 1 = allow, 0 = disallow

set scr_diehard “0” // die-hard mode

set scr_teambalance “1” // player difference for game to consider ‘unbalanced’
set scr_game_spectatetype “2” // by request?

// — GAMETYPE CONFIGURATION —————————

// – Team Deathmatch
set scr_war_scorelimit “10000”
set scr_war_timelimit “15” // timelimit, in minutes

set scr_war_playerrespawndelay “-1” // -1 is no respawn delay, 0 is automatic, > 0 is X seconds
set scr_war_waverespawndelay “0” // wave spawning, might be more ‘tactical’

set scr_war_numlives “0” // number of lives
set scr_war_promode “0” // unknown

set scr_war_roundlimit “1” // maximum amount of rounds
set scr_war_winlimit “1” // amount of wins needed to win a round-based game

// – Domination
set scr_dom_scorelimit “200”
set scr_dom_timelimit “60” // timelimit, in minutes

set scr_dom_playerrespawndelay “-1” // -1 is no respawn delay, 0 is automatic, > 0 is X seconds
set scr_dom_waverespawndelay “0” // wave spawning, might be more ‘tactical’

set scr_dom_numlives “0” // number of lives
set scr_dom_promode “0” // unknown

set scr_dom_roundlimit “1” // maximum amount of rounds
set scr_dom_winlimit “1” // amount of wins needed to win a round-based game

// – FFA
set scr_dm_scorelimit “10000”
set scr_dm_timelimit “15” // timelimit, in minutes

set scr_dm_playerrespawndelay “-1” // -1 is no respawn delay, 0 is automatic, > 0 is X seconds

set scr_dm_numlives “0” // number of lives
set scr_dm_promode “0” // unknown

// – Search and Destroy
set scr_sd_scorelimit “1”
set scr_sd_timelimit “2.5” // timelimit, in minutes

set scr_sd_playerrespawndelay “-1” // -1 is no respawn delay, 0 is automatic, > 0 is X seconds
set scr_sd_waverespawndelay “0” // wave spawning, might be more ‘tactical’

set scr_sd_numlives “1” // number of lives
set scr_sd_promode “0” // unknown

set scr_sd_roundlimit “24” // maximum amount of rounds, 0 is ‘until someone wins’
set scr_sd_winlimit “0” // amount of wins needed to win a round-based game
set scr_sd_roundswitch “12” // after X rounds, switch sides?

set scr_sd_bombtimer “45”
set scr_sd_defusetime “5”
set scr_sd_multibomb “0” // allow multiple people to ‘have the bomb’?
set scr_sd_planttime “5”

// … other gametypes might be easy to figure out, or come in a future update of the template …

// — AUTOMATED ROTATION ——————————-
set sv_mapRotation “gametype sd map mp_afghan gametype sd map mp_fuel2 gametype sd map mp_derail gametype sd map mp_crash gametype sd map mp_nightshift”

[/spoiler]

Step 7.
If you’re hosting this at your house, you will need to portforward. Just google it, this isn’t a tutorial on that. Basically, you will have to port forward the port that the game is running on (in this case 28961)

Step 8.
Run the shortcut. You should see it load your config file, and begin working. Go to the game, and browse for your server. If its on your network, you should be able to see it, and connect.

This is what it should look like if it loaded your cfg and everything is working

 

If your server is running sluggish, try adding the -console parameter in the shortcut. It will change it back to the old console.

Leave any questions below. Thanks!