This forum is for general conversation and user-user networking.
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
-
jtvpn
- OpenVpn Newbie
- Posts: 2
- Joined: Wed Sep 13, 2023 1:42 am
Post
by jtvpn » Wed Sep 13, 2023 1:57 am
Hi,
I have the running the OpenVPN server community version 2.5.5 with no issue so far
I have been trying to port forward the port 80 and 443 by using ufw without a success (line bellow). Is any tutorial on how to do it?
Code: Select all
*nat
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -s 10.10.0.0/24 -o eth0 -j MASQUERADE
-A PREROUTING -p tcp -i eth0 --dport 443 -j DNAT --to-destination 10.10.0.5:443
-A PREROUTING -p tcp -i eth0 --dport 80 -j DNAT --to-destination 10.10.0.5:80
-
jtvpn
- OpenVpn Newbie
- Posts: 2
- Joined: Wed Sep 13, 2023 1:42 am
Post
by jtvpn » Wed Sep 13, 2023 10:08 am
All fixed
The correct syntax will be as follow:
Code: Select all
*nat
:POSTROUTING ACCEPT [0:0]
-A PREROUTING -p tcp --dport 443 -j DNAT --to-destination 10.10.0.5:443
-A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 10.10.0.5:80
-A POSTROUTING -s 10.10.0.0/24 -j MASQUERADE