azam575
CG Super Hardcore Club



- Messages
- 100,030
- Joined
- Jul 19, 2007
- Messages
- 100,030
- Reaction score
- 858
- Points
- 1,076
Salam,
Saja nak share
Script Auto Install Webmin dan Dropbear pada CentOS 6
Login VPS menggunakan roor melalui Putty atau Kitty
Langkah pertama adalah install Wget
yum -y install wget
Langkah kedua, yaitu, memasukkan script berikut:
wget repo.sufanet.com/centos6/autoinstall.sh && chmod +x autoinstall.sh && ./autoinstall.sh
Langkah ketiga, Start Dropbear dengan perintah:
Service Dropbear Start
*Copy paste dari http://www.edisukarman.com/2014/10/script-auto-install-webmin-dropbear.html
yang nie manual install - aku pakai nie
masukkan satu persatu kat putty
DROPBEAR
WEBMIN
pastu login ke webmin ipvpsanda:10000
Thanks
thanks to badh182 juga
Upgrade OpenSSH ke OPENSSH HPN -- vroommm
Cara Membatasi Login User Pada SSH - Centos
OPENVPN MELALUI SSH
aku amik dari website2 merata rata.. maaf
p/s: pastikan link tu penuh masa copy
Saja nak share
Script Auto Install Webmin dan Dropbear pada CentOS 6
Login VPS menggunakan roor melalui Putty atau Kitty
Langkah pertama adalah install Wget
yum -y install wget
Langkah kedua, yaitu, memasukkan script berikut:
wget repo.sufanet.com/centos6/autoinstall.sh && chmod +x autoinstall.sh && ./autoinstall.sh
Langkah ketiga, Start Dropbear dengan perintah:
Service Dropbear Start
*Copy paste dari http://www.edisukarman.com/2014/10/script-auto-install-webmin-dropbear.html
yang nie manual install - aku pakai nie
masukkan satu persatu kat putty
DROPBEAR
yum install -y dropbear
yum -y update
yum -y groupinstall "Development Tools"
wget http://repo.sufanet.com/centos6/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm
yum -y install dropbear
cat > /etc/sysconfig/dropbear <<END
NO_START=0
OPTIONS="-p 443 -W 1024000 -K 3600 -I 3600 "
DROPBEAR_BANNER=""
#DROPBEAR_RSAKEY="/etc/dropbear/dropbear_rsa_host_key"
#DROPBEAR_DSSKEY="/etc/dropbear/dropbear_dss_host_key"
DROPBEAR_RECEIVE_WINDOW=65536
END
chkconfig -add dropbear
chkconfig dropbear on
service dropbear start
service dropbear restart
WEBMIN
yum install perl -y
wget http://repo.sufanet.com/centos6/webmin-1.710-1.noarch.rpm
rpm -U webmin-1.710-1.noarch.rpm
chkconfig webmin on
pastu login ke webmin ipvpsanda:10000
Thanks
thanks to badh182 juga
Upgrade OpenSSH ke OPENSSH HPN -- vroommm
cat /etc/*release*
sshd -V
yum install -y zlib zlib-devel wget nano pam pam-devel openssl openssl-devel gcc patch
cd /usr/src
wget http://www.thirdechelon.org/stuff/openssh-6.6p1-hpnssh14v5.diff.gz
wget http://www.thirdechelon.org/stuff/openssh-6.6p1.tar.gz
tar -xzvf openssh-6.6p1.tar.gz
cd openssh-6.6p1
zcat /usr/src/openssh-6.6p1-hpnssh14v5.diff.gz | patch
./configure -prefix=/usr -sysconfdir=/etc/ssh -with-pam
rm /etc/ssh/ssh_config
rm /etc/ssh/sshd_config
make
make install
cat > /etc/ssh/sshd_config <<END
Port 22
Protocol 2
SyslogFacility AUTHPRIV
ChallengeResponseAuthentication no
GSSAPIAuthentication yes
GSSAPICleanupCredentials yes
UsePAM yes
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
AcceptEnv XMODIFIERS
X11Forwarding no
ClientAliveInterval 60
ClientAliveCountMax 2
PermitRootLogin yes
TcpRcvBufPoll yes
HPNBufferSize 16384
END
service sshd restart
Cara Membatasi Login User Pada SSH - Centos
UNTUK CENTOS
1. Buka Terminal baik dari bitvise atau putty (harus login dengan root password)
2. masukan perintah ini
yum -y install nano
(abaikan jika sudah ada)
lalu
nano /etc/security/limits.conf
-----------------------------
kemudian tambahkan ini di baris kedua dari paling bawah
* hard nproc 2
* - maxlogins 1
2 & 1 merupakan jumlah login yang dapat masuk,
OPENVPN MELALUI SSH
aku amik dari website2 merata rata.. maaf
TUNNELING OPENVPN THROUGH SSH
--------------------------------
I have recently discovered that it is fairly easy to tunnel OpenVPN through SSH. This is useful if you are behind a restrictive firewall that uses SPI to block services rather than plain old port blocking. An SPI firewall is able to distinguish between one packet type and another, without just checking the port that is in use. You can, of course, get a much more in-depth and accurate account of what SPI does/doesn’t do from Wikipedia, however that it’s really the purpose of this post.
You’ll need root access to the OpenVPN Server, as you have to change some of the server config files
So, on to the technical part of the procedure. You need to do the folllowing:
Set the OpenVPN server config file to use TCP rather than UDP. This is done by changing the line proto udp to proto tcp in the server config file (normally located at /etc/openvpn/server.conf).
Set the OpenVPN client config file to use TCP rather than UDP. You can do this by changing the line proto udp to proto tcp-client in the client config file.
Change the OpenVPN client config to connect to localhost rather than the remote server address. This is done by changing the “remote” line of the server to remote localhost 1194
Create an SSH tunnel between the client machine and the OpenVPN Server, and forward from remote:1194 to localhost:1194. This can be done by running the command:
ssh user@server -L 1194:localhost:1194 on the client machine (assuming you’re running Linux/Unix with the OpenSSH client binary installed)
All being well, after making those config file changes and creating your SSH tunnel, you’ll be able to tunnel OpenVPN through SSH.
It’s not the ideal solution – the is a lot more overhead when running OpenVPN in TCP mode, and even more when tunneling TCP over TCP, which is what you’re doing by using an SSH tunnel with VPN Traffic. However, needs must – and this is one way of getting round an SPI Firewall when SSH connections are allowed
---------------------------------
Modify the server vpn configuration file by adding proto tcp-server
Start the VPN server
Modify the client by changing the first line to remote localhost and adding the line proto tcp-client
Tunnel your local port 1194 (what OpenVPN uses) to 1194 on the machine you want to access - via the web server hosting the SSH daemon:
ssh -L1194:vpnserver:1194 user@webserver
Start the VPN client
------------------
Tunneling OpenVPN through SSH
Having a bit of time, and remembering that OpenVPN had an option for SOCKS proxies, I decided to take a stab at getting OpenVPN to work through a SOCKS proxy.
It was far easier than expected.I’m on a Windows 7 system, so I had to set PuTTY up to create a tunnel – under Connection > SSH > Tunnels, I added 31337 as a source port, and set it to ‘Dynamic‘.
After that, I just added the line socks-proxy localhost 31337 to the OpenVPN config file – again, the TCP-based one, not the UDP-based one.
And that was pretty much it – hit connect in OpenVPN, and it worked.
I was pleased.
--------------------
p/s: pastikan link tu penuh masa copy
Last edited: