How to use psyBNC

psyBNC installs on a shell and basically acts as a proxy server for IRC and keeps your connection to the server alive 24/7. So even if you aren't online in iRC your nick is still there as if you are. You can add other users to your psyBNC and have multiple servers.

Doing this would still be only one task running in your shell, but not one background task.        
                                                                         
DOWNLOAD // INSTALL:                                                
````````````````````                                                     
You'll need an SSH program to login to your account. If you have one and know how to use it skip this section. If not, one of my favorite SSH programs is PuTTY - freeware, tiny, portable - though it places its data (saved sessions, SSH host keys)in the registry.      
                                                                         
SETUP ACCOUNT:                                                           
``````````````                                                           
Open SeucreCRT                                                           
Select: Connect (1st button from left) / New Session (3rd button from left)                                                                    
Name: As you like                                                        
Protocol: SSH2 (different host might have different protocol)            
Hostname, enter your shell's host IP e.g. myhost.sisrv.net               
Port: 22  or whatever port is assigned by your hosting provider                                                               
Once connected you will be prompted for your user name and pass, enter those and select save if don't want to enter those every time logging in.
Change your password, enter: passwd                                      
You will be prompted twice to enter new password. You won't be able to see it or even see the cursor move. Do not use simple passwords!             
ex no: blackcoffee ex yes: B|a()k_-c0f33                                 
       
Hit enter key to scroll the complete list, find the one you like, make a  note of it.                                                              
                                                                         
INSTALLING PSYBNC:                                                    
``````````````````                                                       
Enter the cmds (commands) as below except change the home path to yours. 
Type in each line, hit enter, wait for each cmd to finish before         
proceeding to the next.                                                  
Follow these cmds below for easy setup and <u>not</u> the order you are prompted for.                                                                     
enter: cd ~   (changes current directory to root of your shell)          
enter: wget https://sisrv.net/files/bnc-znc/psyBNC-2.4.3.tar.gz 

*NOTE: At the time of this tutorial there is v2.4.3 but I have found it to have problem's' with Multiple Networks.

enter: tar -zxvf psyBNC-2.4.3.tar.gz  (this will un-compress it)       
enter: cd psybnc OR cd /home/user/psybnc   (to enter the directory that  
you un-tar'ed everything to) *Note: /user/ would be replaced with        
your own account name.                                                       
enter: make                                                              
enter: pico psybnc.conf (`pico' is the shells file editor, use arrow keys
to navigate, right click to instantly paste)                             
                                                                         
It will have this:                                                       
PSYBNC.SYSTEM.PORT1=31337                                                
PSYBNC.SYSTEM.HOST1=*                                                    
PSYBNC.HOSTALLOWS.ENTRY0=*;*                                             
                                                                         
PORT:                                                                    
Top line showing this: PSYBNC.SYSTEM.PORT1=31337                         
Change it to for ex: PSYBNC.SYSTEM.PORT1=49979                           
The default port for psybnc is 31337, for security you must change it to whatever you like using only ports 30000-60000. (A minority of     
shell companies may have a smaller range or different range of ports allowed; check with your shell host if you aren't sure.)                 
                                                                         
SSL:                                                                     
2nd line showing this: PSYBNC.SYSTEM.HOST1=*                             
Optional: If you want SSL change to: PSYBNC.SYSTEM.HOST1=S=*             
(This creates a SSL-encrypted listening socket.)                         
If that line isn't there; type or paste it in.                           
Linux lowercase and uppercase are not the same.                          
Example: s is not the same as S                                          
                                                                         
DCC:                                                                     
Yes you can dcc on psybnc, don't believe those they say you can't :p     
Add this line if not there already: PSYBNC.SYSTEM.DCCHOST=12.346.456.88  
replace that IP with the IP of your vhost that you are going to use.     
                                                                         
Hit ctrl-x to exit file, type Y /enter to save (N /enter to cancel).     
                                                                         
To finish enabling dcc make a directory path in your psybnc directory    
/home/user/psybnc/downloads/USER1/                                       
for example:                                                             
mkdir -p /downloads/USER1                                                
USER1 will be you in the psybnc.conf. If you add other users to the bnc  
you will need to create a directory for them as well: USER2, etc. See    
psybnc.conf to find out which USER number they have been assigned.       
then instead of using: /dccget ....                                      
use:/quote dccget ......                                                 
This will send the file to your shell. From there login to your shell to 
download it.                                                             
                                                                         
*You could also download psybnc.conf to your box and manually edit it in 
Word Pad etc (instead of pico). If you do it this way:                   
1. Keep a copy of original just in case, which is always a good idea every
so often in case shell goes down.                                        
2. When uploading new file, delete old one first- sometimes it will just 
merge with old one and not truly over-write it.                          
                                                                         
MOVE SALT FILE:                                                          
```````````````                                                          
You need to move the file 'salt.h' (file containing the encryption keys) 
to a safe place:                                                         
mkdir backup | mv salt.h ~/psybnc/backup                                 
If you skip this step each time you login to your psyBNC you'll be       
prompted "WARNING ! Move the file salt.h from the shell to a safe place" 
If you ever need to recompile your psyBNC you must be move salt.h back   
first or it will create a new one (new keys) and psyBNC will not be able 
to decrypt your existing user passwords, channel keys, etc.              
                                                                         
START BNC:                                                               
``````````                                                               
enter (if not already there): cd /home/user/psybnc                       
enter: ./psybnc                                                          
Done! Your bnc has started.                                              
                                                                         
FEW OTHER SHELL CMDS:                                                    
`````````````````````                                                    
enter: ps x (shows all process's alive)                                  
to kill/stop a process, enter: kill -15 **** (* = corresponding number to
the process; `pid')                                                      
enter: ps -U username (shows all process' you are running)               
enter: help (generally will show your host's information and offerings.  
                                                                         
SETUP BNC ON mIRC:                                                       
``````````````````                                                       
Open new mIRC, don't connect; setup a new entry to connect to:           
Tools/Options/Connect/Servers/Add/                                       
Description: as you like                                                 
IRC Server: your shell host IP                                           
Port: bnc port (the same one you entered during install)                 
Password: Same as your shell pass                                        
Hit Add, Connect.                                                        
*This is assuming you have already added your name & ident in mIRC,      
If not: mIRC/Tools/Options/Connect:                                      
Full Name: Your login name.                                              
Email Address: your.ident@whatever.com                                   
Nickname: Name you want to use on IRC (some networks maximum 9 characters,
can't begin with a number)                                               
Alternative: Another name in case that name is in use by another already 
Tools/Options/Connect/Identd:                                            
Check `Enable Identd server'                                             
User ID: Your.ident                                                      
System: UNIX                                                             
Port: 113                                                                
Check `Show Identd requests' (this is useful to see if you are having ident problems).                                                         
Check `Enable only when connecting'.                                     
                                                                         
*Note: At times you might get disconnected from your bnc. mIRC then will  automatically try to reconnect you, if it can't it will try the next     
server in it's list- which will then connect you to a standard mIRC server, naked, without your bnc!                                    
To disable this: mIRC/Tools/Connect/Options/Retry/ un-check `Try next  server in group'/ click OK / OK                                          
                                                                         
CONNECTING TO IRC SERVERS:                                               
``````````````````````````                                               
These cmds are for mIRC. To do the same with IRC programs like IRSSI     
precede all cmds with 'quote', ex: /quote setusername Here               
Once connected to your psybnc, psybnc welcome window will open. Enter:   
/setusername Here                                                        
/setawaynick _Here_                                                      
/bvhost Here (the one you made a note of)                                
/addserver server:port ex: /addserver irc.sisrv.net: or for SSL connection: /addserver S=irc.sisrv.net:+6697                                                   
If the server requires a password: /addserver server:port password       
                                                                         
You can add up to 9 servers, use all 9 in case the others don't work for  you, psybnc will automatically try next servers you have entered.        
To use SSL servers, the server it self must support it.                  
Efnet's SSL port is 9999.                                                
Linknet's SSL port is 7000.                                              
Linknet's                                                
Efnet's port is 6667 and +6697                                               
Freenode's port is 6667 and +6697                                             
For example on SiSrv's list is: irc.sisrv.net 
To use an SSL server it would be: /addserver S=irc.sisrv.net:6697     
                                      
                                                                         
IF when you are trying to connect to a server and keep receiving         
'disconnected from server' error:                                        
&lt;-psyBNC&gt; Thu Dec  6 13:25:44 :User sisrv (l) trying irc.sisrv.net port 6667 (your.vhost).
&lt;-psyBNC&gt; Thu Dec  6 13:25:44 :User sisrv got disconnected from server.  
                                                                         
Try changing your vhost. This might not be the reason but if you are sure
your other settings are correct this has easily fixed it for me.         
                                                                         
OTHER CMDS:                                                              
```````````                                                              
/bhelp (full list of psybnc cmds including these)                        
/bconnect (if still not connected)                                       
/bquit (to kill IRC connection)                                          
/jump (to activate changes, change servers)                              
/listservers (show servers you have added)                               
/delserver number.here (to remove a server)                              
/brehash (to kill and restart bnc)                                       
                                                                         
MULTIPLE NETWORKS:                                                       
``````````````````                                                       
If you want to be on multiple networks at the same time, one instance of 
your IRC program running, very easy. For example you are on are efnet    
already and want to go to linknet. Set up a new network, same as you     
did with efnet, except we will call it `l' for example. l for linknet,   
you can call it anything you like but keep it short as you will need to  
type this name for cmds.                                                 
enter: /addnetwork l                                                     
All cmds now must be followed by: l'                                     
enter: /bvhost l'your.vhost                                              
enter: /addserver l'server.here:6667                                     
Or for SSL: /addserver l'S=server.here:7000                              
                                                                         
MULTIPLE NETWORKS CMDS:                                                  
```````````````````````                                                  
All cmds to go to this server will be followed with l'                   
for example: /msg l'mewbies                                              
or /join l'#mewb                                                         
or /jump l'                                                              
or /bconnect l' ... you get the idea                                     
                                                                         
ADD USERS:                                                               
``````````                                                               
The default of the amount of users you can add to your psybnc is 50. If  
you want to change that amount:                                          
pico config.h                                                            
edit to the amount you want under: MAXUSER                               
Note most shell companies; each user will count as 1 process. Meaning that
if you bought a shell with 2 process's you are allowed by the shell      
company to add only 1 more user.                                         
                                                                         
In mIRC enter:                                                           
The name that you add a user is the login name that they must enter in   
their mIRC under `Full Name'. This does not need to be their IRC nick. For
security it's better to not use the same name; don't give away a piece of
the puzzle to a hacker.                                                  
/adduser Ident.here :Name.here                                           
/password Ident :pass                                                    
/addallow Ident@there.IP.here                                            
example:                                                                 
/adduser mewmew :mewbie                                                  
/password mewmew :99)Ikxy55tYg0JkM-(_K                                   
/addallow mewmew@mewbies.com                                             
/addallow mewmew@81.177.*.*                                              
                                                                         
-If you want the user to be able to dcc you'll need to do the dcc steps  
 for them, entering their vhost.                                         
-Keep track of the vhost that are being used in your account, inform any 
 new user you add to not use those as you don't want to get banned for   
 cloning.                                                                
-Then give your users the instructions from above `SETUP BNC ON mIRC' to 
 `OTHER CMDS' to carry out.                                              
                                                                         
Remember to do: /bhelp to have a complete list of psybnc cmds :D         
                                                                         
AUTOSTART PSYBNC:                                                        
`````````````````                                                        
If you want your psybnc to run automatically even after a reboot it's    
simple- just a few steps are involved. We will make a 'bash script' and  
'crontab' it. This will check every 10 minutes if it is running, if not  
it will start it for you:                                                
                                                                         
LOCATION OF BASH:                                                        
First find the location of your bash:                                    
which bash                                                               
My reply is: /bin/bash so that will be the path in the top line of the the
bash script.                                                             
                                                                         
UNIQUE PROCESS NAME:                                                     
Then to find something unique in psybnc's process name - something that  
isn't in your other processes. This will show your current running       
processes:                                                               
ps x                                                                     
For example reply might be:                                              
PID TTY      STAT   TIME COMMAND                                         
2052 ?        Sl    17:41 ./eggdrop Bot1.conf                            
18526 ?        Sl     0:14 ./eggdrop Bot2.conf                           
2239 ?        S      0:21 ./psybnc                                       
24395 ?        R      0:00 sshd: user@pts/3                              
24396 pts/3    Rs     0:00 -bash                                         
24419 pts/3    R+     0:00 ps x                                          
                                                                         
I'll choose the word 'psybnc'                                            
                                                                         
CREATE BASH SCRIPT:                                                      
OK Lets create a bash script for it, using our unique words for 'SERVICE':
cd ~                                                                     
pico psybnc.sh  (this file doesn't exist yet, name it anything.sh you    
like)                                                                    
paste in - changing all to your correct path:                            
#!/bin/bash
SERVICE="psybnc"
RUNIT="/home/user/psybnc/./psybnc"
if /bin/ps ax | /bin/grep -v /bin/grep | /bin/grep $SERVICE > /dev/null
then
    echo "$SERVICE service running, everything is fine"

else

$RUNIT

fi
exit
                                                                         
Now set the perms on your new file:                                      
chmod 744 psybnc.sh                                                      
                                                                         
Kill psybnc if it's running:                                             
kill -15 [its pid number]                                                
(If that didn't kill it then use kill -9 [its pid number]                
Test the bash script it works correctly:                                 
./psybnc.sh                                                              
                                                                         
CRONTAB BASH SCRIPT:                                                     
If all went well kill it again so we can test crontab:                   
kill -15 [its pid number]                                                
This will make crontab run the *psybnc.sh every 10 minutes. Where ever   
you pico/created your bash script is its path- you need to have the      
correct full path. Create a crontab:                                     
crontab -e                                                              
Paste in, below the other crontab jobs if there are any:                 
0,10,20,30,40,50 * * * * /home/user/psybnc.sh >/dev/null 2>&1            
                                                                         
It will reply: crontab: installing new crontab                           
Wait 10 minutes and then see if it's running:                            
ps x                                                               
                                                                         
To list all your crontab jobs: crontab -l                               
To remove 'all' your crontab jobs: crontab -r                           
To remove only certain jobs of course do: crontab -e             
then remove them.                                                        
                                                                         

                                                                         
PSYBNC LOG:                                                    
```````````                                                              
psybnc keeps its log here: ~/log/psybnc.log                              
It is already setup to rotate; it will rename the present log to         
psybnc.log.old and create a new psybnc.log.                              
For help on log variables type into your IRC window: /bhelp              
To view your mainlog:                                                    
/PLAYMAINLOG                                                             
To erase it:                                                             
/ERASEMAINLOG

  • psyBNC, use bnc, use psyBNC, addserver, bnc ssl, bnc port, bnc help
  • 101 Utilizadores acharam útil
Esta resposta foi útil?

Artigos Relacionados

How To Install psyBNC

psyBNC is small, lightweight software for usage in IRC (Internet Relay Chat). Bouncers have...

psyBNC FAQ

| psyBNC-FAQ (Frequently Asked Questions) for psyBNC | This FAQ does not...

Frequently Asked Questions

Frequently Asked Questions - up to version 2.3.2 Q: I tried to add a User for getting Op from...

How to recover psyBNC password

To reset password of your psybnc follow the steps mentioned below: Login to the shell account...

How to install sBNC

shroudBNC  or sBNC is a modular IRC proxy written in C++. It is capable of proxying IRC...

Powered by WHMCompleteSolution