Skip to content

Commit

Permalink
openvpn.sh fix dperson#281
Browse files Browse the repository at this point in the history
  • Loading branch information
David Personette committed Apr 28, 2020
1 parent d0155e3 commit 6c928a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openvpn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,13 @@ vpn() { local server="$1" user="$2" pass="$3" port="${4:-1194}" proto=${5:-udp}\
# protocol) optional protocol (defaults to TCP)
# Return: configured NAT rule
vpnportforward() { local port="$1" protocol="${2:-tcp}"
ip6tables -t nat -A OUTPUT -i tun0 -p $protocol --dport $port -j DNAT \
ip6tables -t nat -A OUTPUT -p $protocol --dport $port -j DNAT \
--to-destination ::11:$port 2>/dev/null
ip6tables -A INPUT -p $protocol -m $protocol --dport $port -j ACCEPT \
2>/dev/null
ip6tables -A FORWARD -i tun0 -p $protocol -m $protocol --dport $port -j \
ACCEPT 2>/dev/null
iptables -t nat -A OUTPUT -i tun0 -p $protocol --dport $port -j DNAT \
iptables -t nat -A OUTPUT -p $protocol --dport $port -j DNAT \
--to-destination 127.0.0.11:$port
iptables -A INPUT -p $protocol -m $protocol --dport $port -j ACCEPT
iptables -A FORWARD -i tun0 -p $protocol -m $protocol --dport $port -j \
Expand Down

0 comments on commit 6c928a7

Please sign in to comment.