Erst mal danke für diese wunderbare Anleitung.
Ich komme so weit, dass die Verbindung von Clients zu Servern klappt, jedoch das Aufrufen von externen Seiten nicht funktioniert. Ich nutze auf dem Systemd firewalld
und habe probiert, die pre
und post
commands entsprechend anzupassen (habe es auch schon mit den iptables
commands probiert):
firewall-cmd --zone=public --add-masquerade; firewall-cmd --direct --add-rule ipv4 filter FORWARD 0 -i %i -o eno1 -j ACCEPT; firewall-cmd --direct --add-rule ipv4 nat POSTROUTING 0 -o eno1 -j MASQUERADE
firewall-cmd --zone=public --remove-masquerade; firewall-cmd --direct --remove-rule ipv4 filter FORWARD 0 -i %i -o eno1 -j ACCEPT; firewall-cmd --direct --remove-rule ipv4 nat POSTROUTING 0 -o eno1 -j MASQUERADE
Die Portfreigabe via firewalld
hat imo geklappt, da:
# tcpdump -i wg0
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on wg0, link-type RAW (Raw IP), snapshot length 262144 bytes
10:19:43.968380 IP 10.252.1.1.32319 > dnsforge.de.domain: 14216+ A? chat.signal.org. (33)
Im anderen Interface eno1
sehe ich jedoch nichts. Auch der Versuch via wg0
vom Hostsystem einen curl
abzusetzen, schlägt fehl:
# curl --interface wg0 http://httpbin.org/ip
curl: (7) Failed to connect to httpbin.org port 80: No route to host
Der Forward output der iptables:
# iptables -vnL FORWARD
Chain FORWARD (policy DROP 1018 packets, 62703 bytes)
pkts bytes target prot opt in out source destination
58 3455 ACCEPT all -- wg0 eno1 0.0.0.0/0 0.0.0.0/0
Habt ihr noch Ideen, was ich verpeilt haben könnte? Danke im Voraus!
EDIT: Hier der postrouting output:
Chain POSTROUTING (policy ACCEPT 6662 packets, 405K bytes)
pkts bytes target prot opt in out source destination
2506 153K MASQUERADE all -- * eno1 0.0.0.0/0 0.0.0.0/0