mirror of
https://github.com/Nyr/openvpn-install.git
synced 2024-11-24 05:56:08 +03:00
Cleaner port 53 setup
This commit is contained in:
parent
fad088013c
commit
fb036d575b
@ -132,7 +132,6 @@ if [[ -e /etc/openvpn/server.conf ]]; then
|
|||||||
fi
|
fi
|
||||||
rm -rf /etc/openvpn
|
rm -rf /etc/openvpn
|
||||||
rm -rf /usr/share/doc/openvpn*
|
rm -rf /usr/share/doc/openvpn*
|
||||||
sed -i '/--dport 53 -j REDIRECT --to-port/d' $RCLOCAL
|
|
||||||
sed -i '/iptables -t nat -A POSTROUTING -s 10.8.0.0/d' $RCLOCAL
|
sed -i '/iptables -t nat -A POSTROUTING -s 10.8.0.0/d' $RCLOCAL
|
||||||
echo ""
|
echo ""
|
||||||
echo "OpenVPN removed!"
|
echo "OpenVPN removed!"
|
||||||
@ -262,8 +261,7 @@ else
|
|||||||
esac
|
esac
|
||||||
# Listen at port 53 too if user wants that
|
# Listen at port 53 too if user wants that
|
||||||
if [[ "$ALTPORT" = 'y' ]]; then
|
if [[ "$ALTPORT" = 'y' ]]; then
|
||||||
iptables -t nat -A PREROUTING -p udp -d $IP --dport 53 -j REDIRECT --to-port $PORT
|
sed -i '/port 1194/a port 53' server.conf
|
||||||
sed -i "1 a\iptables -t nat -A PREROUTING -p udp -d $IP --dport 53 -j REDIRECT --to-port $PORT" $RCLOCAL
|
|
||||||
fi
|
fi
|
||||||
# Enable net.ipv4.ip_forward for the system
|
# Enable net.ipv4.ip_forward for the system
|
||||||
if [[ "$OS" = 'debian' ]]; then
|
if [[ "$OS" = 'debian' ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user