User Tools

Site Tools


vpn

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
vpn [2022/11/30 12:35]
robm
vpn [2025/11/12 09:39] (current)
Line 41: Line 41:
 # responses are likewise accepted # responses are likewise accepted
 echo 1 > /proc/sys/net/ipv4/ip_forward echo 1 > /proc/sys/net/ipv4/ip_forward
-/sbin/iptables -F+#/sbin/iptables -F
 /sbin/iptables -A FORWARD ! --source 172.16.0.2 --destination 172.16.0.2 \ /sbin/iptables -A FORWARD ! --source 172.16.0.2 --destination 172.16.0.2 \
         -m state --state RELATED,ESTABLISHED -j ACCEPT         -m state --state RELATED,ESTABLISHED -j ACCEPT
Line 50: Line 50:
 # this host, so *we* can forward it to the remote end. This is the MASQUERADE # this host, so *we* can forward it to the remote end. This is the MASQUERADE
 # rule. # rule.
-/sbin/iptables -t nat -F +#/sbin/iptables -t nat -F 
-/sbin/iptables -t nat -A POSTROUTING --destination 172.16.0. -j MASQUERADE+/sbin/iptables -t nat -A POSTROUTING --source 172.16.0. -j MASQUERADE
  
 # Monitor packets # Monitor packets
Line 332: Line 332:
     sudo systemctl enable frp.service  # So it starts automatically on boot     sudo systemctl enable frp.service  # So it starts automatically on boot
     sudo systemctl start frp.service  # .. one off start it now     sudo systemctl start frp.service  # .. one off start it now
 +
 +
vpn.1669811743.txt.gz · Last modified: 2022/11/30 12:35 by robm