• Hey Guest,

    As you know, censorship around the world has been ramping up at an alarming pace. The UK and OFCOM has singled out this community and have been focusing its censorship efforts here. It takes a good amount of resources to maintain the infrastructure for our community and to resist this censorship. We would appreciate any and all donations.

    Bitcoin Address (BTC): 39deg9i6Zp1GdrwyKkqZU6rAbsEspvLBJt

    Ethereum (ETH): 0xd799aF8E2e5cEd14cdb344e6D6A9f18011B79BE9

    Monero (XMR): 49tuJbzxwVPUhhDjzz6H222Kh8baKe6rDEsXgE617DVSDD8UKNaXvKNU8dEVRTAFH9Av8gKkn4jDzVGF25snJgNfUfKKNC8

Luke

Luke

tired
Apr 11, 2018
291
I accidentally logged in without being connected because I am an idiot.
So here's a copy paste solution to this because I couldn't find any.
Applies to PPTP vpn on debian/mint/ubu/possibly others.

Lets just leave this here might come in handy for some.

1. switch to root
Code:
sudo bash
enter password

2. open /etc/rc.local
Code:
nano /etc/rc.local

3. copy and paste this to the end of the file, leave stuff at the top intact

Code:
sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1
sysctl -w net.ipv6.conf.lo.disable_ipv6=1

iptables -F
iptables -P OUTPUT ACCEPT
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT

chain_exists=`iptables --list |grep ALLOWVPN |grep -v grep |wc -l`
if [ "$chain_exists" -gt 0 ];
then
sudo iptables -X ALLOWVPN
fi

chain_exists=`iptables --list |grep BLOCKALL |grep -v grep |wc -l`
if [ "$chain_exists" -gt 0 ];
then
sudo iptables -X BLOCKALL
fi

sudo iptables -N ALLOWVPN
sudo iptables -N BLOCKALL
sudo iptables -A OUTPUT -o ppp+ -j ACCEPT
sudo iptables -A OUTPUT -o lo+ -j ACCEPT
sudo iptables -A OUTPUT -j ALLOWVPN
sudo iptables -A OUTPUT -j BLOCKALL
sudo iptables -A ALLOWVPN -d X.X.X.X -j ACCEPT
sudo iptables -A BLOCKALL -j DROP

echo "nameserver 8.8.8.8" > /etc/resolv.conf
echo "nameserver 8.8.4.4" >> /etc/resolv.conf
exit 0

3. replace X.X.X.X to the VPN's IP address.
save and exit

4. make it start on boot so that you won't forget like I did, type
Code:
sudo chmod +x /etc/rc.local

5. reboot

Now you should have no connection at all if the VPN is inactive.
If you have no VPN hit me up I have 3 unused russian datacenter IPs.

To turn off the thing so the internet works without a VPN type:
Code:
sudo iptables -F

PS: I know I know but it's idiot proof and good enuff.
 
Last edited:

Similar threads

Darkover
Replies
3
Views
399
Offtopic
jodes2
jodes2