mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 13:46:59 +01:00
Custom dynamic DNS to get rid of damn no-ip
This commit is contained in:
parent
c1ae999fa6
commit
994ffba153
6 changed files with 50 additions and 6 deletions
|
|
@ -9,10 +9,10 @@ iptables -X
|
|||
|
||||
echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||
|
||||
PORTS_TO_FORWARD_TCP="25 80 110 143 443 465 587 993 995 2224 3478 8008 8448 27015 64738"
|
||||
PORTS_TO_FORWARD_UDP="34197 64738"
|
||||
DESTINATION_IP="212.83.165.111"
|
||||
#DESTINATION_IP="5.9.66.49"
|
||||
PORTS_TO_FORWARD_TCP="25 53 80 110 143 443 465 587 993 995 2224 3478 8008 8448 27015 64738"
|
||||
PORTS_TO_FORWARD_UDP="53 34197 64738"
|
||||
#DESTINATION_IP="212.83.165.111"
|
||||
DESTINATION_IP="5.9.66.49"
|
||||
|
||||
for port in `echo $PORTS_TO_FORWARD_TCP`
|
||||
do
|
||||
|
|
@ -25,4 +25,4 @@ do
|
|||
iptables -t nat -A PREROUTING -p udp -m udp --dport ${port} -j DNAT --to-destination ${DESTINATION_IP}
|
||||
iptables -A FORWARD -d ${DESTINATION_IP}/32 -p tcp -m tcp --dport ${port} -j ACCEPT
|
||||
done
|
||||
iptables -t nat -A POSTROUTING -j MASQUERADE
|
||||
iptables -t nat -A POSTROUTING -j MASQUERADE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue