Hatena::ブログ(Diary)

司南魚

 

2019-01-12

2019-01-09

ubuntu PPTP route

https://askubuntu.com/questions/492923/pptpd-vpn-no-internet-access-after-connecting


I assume “net.ipv4.ip_forward” is commented in the /etc/sysctl.conf file:

nano /etc/sysctl.conf

Add or find and comment out the following line

net.ipv4.ip_forward=1

Save, close the file and run the following command to make the changes take effect.

sysctl -p

The following iptables firewall rules allow port 1723, GRE and perform NAT

iptables -I INPUT -p tcp --dport 1723 -m state --state NEW -j ACCEPT
iptables -I INPUT -p gre -j ACCEPT
iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE

In the last rule replace “eth0″ with the interface connecting to the internet on your VPN server. Finally the following rule is required to ensure websites load properly

iptables -I FORWARD -p tcp --tcp-flags SYN,RST SYN -s 172.20.1.0/24 -j TCPMSS --clamp-mss-to-pmtu

Replace 172.20.1.0/24 with the IP address range used in the “remoteip” option in the /etc/pptpd.conf this firewall rule is used to ensure a proper MTU value is used to prevent fragmentation.

2018-12-08

ubuntu ssh Permission denied (publickey)

Check /etc/ssh/sshd_config file. There, find the line which says

PasswordAuthentication no

That line needs to be modified to say yes instead of no. Also, restart the sshd server afterwards.

sudo /etc/init.d/ssh restart

2018-12-07

ubuntu ssh Permission denied (publickey)

Check /etc/ssh/sshd_config file. There, find the line which says

PasswordAuthentication no

That line needs to be modified to say yes instead of no. Also, restart the sshd server afterwards.

sudo /etc/init.d/ssh restart

2018-11-25

Terminal does not start on Remote Desktop

changing the locale in /etc/default/locale back to the defaultc contents of that file to:

LANG="en_US.UTF-8"
LANGUAGE="en_US"