Answer the question
In order to leave comments, you need to log in
Https to localhost ubuntu?
Good afternoon.
I needed to set up https, did everything according to the manual, but when I go to https://example.dev it opens
Apache2 Ubuntu Default Page
The HTTPS protocol works on port 443, so if the server is behind a gateway, then you need to forward this port on it.
Answer the question
In order to leave comments, you need to log in
You need something like this.
##### fwmark ######
iptables -t mangle -F
iptables -t mangle -X
iptables -t mangle -A PREROUTING -j CONNMARK --restore-mark
iptables -t mangle -A PREROUTING -m mark ! --mark 0 -j RETURN # if already set, we're done
iptables -t mangle -A PREROUTING -i wan1 -j MARK --set-mark $MARK_WAN1
iptables -t mangle -A PREROUTING -i wan2 -j MARK - -set-mark $MARK_WAN2
iptables -t mangle -A POSTROUTING -o wan1 -j MARK --set-mark $MARK_WAN1
iptables -t mangle -A POSTROUTING -o wan2 -j MARK --set-mark $MARK_WAN2
iptables -t mangle -A POSTROUTING -j WAN1 --save-mark
##### NAT ######
iptables -t nat -F
iptables -t nat -X
for local in "list of internal IP/netmask combos"; do
iptables -t nat -A POSTROUTING -s $local -o wan1 -j SNAT --to-source "IP"
iptables -t nat -A POSTROUTING -s $local -o wan2 -j SNAT --to-source "IP »
done
And the rules:
ip rule add fwmark $MARK_WAN2 pref 2000 lookup wan2
ip rule add fwmark $MARK_WAN1 pref 2001 lookup wan1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question