linux vpn install bash script

Have a tool that you think is awesome enough to be promoted by Hackerthreads? Submit it in a thread here. This forum is write-only, like a drop-box, and you will not be able to see other threads.

linux vpn install bash script

Postby chinaprince » Thu Mar 29, 2012 10:46 pm

Code: Select all
#!/bin/sh
echo -e "\033[1;035m \n"
echo "#########################################################"
echo "                 WelCome to Www.90sec.org                "
echo "                     Linux install pptpd                 "
echo "                        By:Mr,PriNce                     "
echo "                  email:chinaprincehack@gmail.com        "
echo "#########################################################"
if [ $(id -u) != "0" ];then
echo sorry,!root....
exit 1
fi
host=`hostname -i`
name=`hostname`
echo "                                 $name         "
echo "                                 $host         "
bit=`uname -a|grep "x86_64"`
if [ "$bit" = "" ];then
echo "32bit"
wget http://poptop.sourceforge.net/yum/stable/rhel5/i386/dkms-2.0.17.5-1.noarch.rpm
wget http://poptop.sourceforge.net/yum/stable/rhel5/i386/pptpd-1.3.4-2.rhel5.i386.rpm
rpm -ivh dkms-2.0.17.5-1.noarch.rpm --force --nodeps
rpm -ivh pptpd-1.3.4-2.rhel5.i386.rpm --force --nodeps
rm -rf pptpd-1.3.4-2.rhel5.i386.rpm
rm -rf dkms-2.0.17.5-1.noarch.rpm
cat >>/etc/pptpd.conf<<EOF
option /etc/ppp/options.pptpd
logwtmp
localip 192.168.1.12
remoteip 192.168.1.13-238
EOF
cat >>/etc/ppp/options.pptpd<<EOF
name pptpd
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe-128
proxyarp
lock
nobsdcomp
novj
novjccomp
nologfd
ms-dns 8.8.8.8
ms-dns 4.4.4.4
EOF
cat >>/etc/ppp/chap-secrets<<EOF
vpn         pptpd    vpn365     *
EOF
sed -i "s/net.ipv4.ip_forward = 0/net.ipv4.ip_forward = 1/g" grep "net.ipv4.ip_forward = 0" /etc/sysctl.conf
sysctl -p
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j SNAT --to-source $host
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o eth0 -j MASQUERADE
/etc/init.d/iptables save
/etc/init.d/iptables restart
/etc/init.d/pptpd restart
/etc/init.d/pptpd restart
chkconfig pptpd on
chkconfig iptables on
else
echo "64bit"
wget http://poptop.sourceforge.net/yum/stable/rhel5/x86_64/dkms-2.0.17.5-1.noarch.rpm
wget http://poptop.sourceforge.net/yum/stable/rhel5/x86_64/pptpd-1.3.4-2.rhel5.x86_64.rpm
rpm -ivh dkms-2.0.17.5-1.noarch.rpm --force --nodeps
rpm -ivh pptpd-1.3.4-2.rhel5.x86_64.rpm --force --nodeps
rm -rf dkms-2.0.17.5-1.noarch.rpm
rm -rf pptpd-1.3.4-2.rhel5.x86_64.rpm
cat >>/etc/pptpd.conf<<EOF
option /etc/ppp/options.pptpd
logwtmp
localip 192.168.1.12
remoteip 192.168.1.13-238
EOF
cat >>/etc/ppp/options.pptpd<<EOF
name pptpd
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe-128
proxyarp
lock
nobsdcomp
novj
novjccomp
nologfd
ms-dns 8.8.8.8
ms-dns 4.4.4.4
EOF
cat >>/etc/ppp/chap-secrets<<EOF
vpn         pptpd    vpn365     *
EOF
sed -i "s/net.ipv4.ip_forward = 0/net.ipv4.ip_forward = 1/g" grep "net.ipv4.ip_forward = 0" /etc/sysctl.conf
sysctl -p
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j SNAT --to-source $host
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o eth0 -j MASQUERADE
/etc/init.d/iptables save
/etc/init.d/iptables restart
/etc/init.d/pptpd restart
/etc/init.d/pptpd restart
chkconfig pptpd on
chkconfig iptables on             
echo "Thank you for using"
echo  "                                 $name         "
echo "                                  $host         "
fi
chinaprince
n00b
 
Posts: 2
Joined: Wed Mar 28, 2012 6:52 am

Re: linux vpn install bash script

Postby Cool_Fire » Fri Mar 30, 2012 8:38 pm

Can you provide some details on what it does and how to use this script?
If we're breaking the rules, then how come you can't catch us? You can't find us? I know why. Cause, it's ... MAGIC!

Hackerthreads chat, where the party is going 24/7.
User avatar
Cool_Fire
Not a sandwich
 
Posts: 1528
Joined: Fri May 09, 2003 1:20 pm
Location: 41 6d 73 74 65 72 64 61 6d

Re: linux vpn install bash script

Postby TheShadowFog » Fri Apr 13, 2012 12:34 pm

I think it sets up a VPN.
User avatar
TheShadowFog
n00b
 
Posts: 11
Joined: Tue Feb 14, 2012 9:12 pm

Re: linux vpn install bash script

Postby Cool_Fire » Fri Apr 13, 2012 2:48 pm

How very concise of you.
I was hoping for a little more specific info though.
If we're breaking the rules, then how come you can't catch us? You can't find us? I know why. Cause, it's ... MAGIC!

Hackerthreads chat, where the party is going 24/7.
User avatar
Cool_Fire
Not a sandwich
 
Posts: 1528
Joined: Fri May 09, 2003 1:20 pm
Location: 41 6d 73 74 65 72 64 61 6d


Return to Tool Submission

Who is online

Users browsing this forum: No registered users and 0 guests