EC2 - all queries are made by localhost

I have an amazon EC2 machine running pihole and openvpn server.
server runs on 10.0.2.1/24

dns port is not open to internet
openvpn port is open to internet

I have a router at home connected to internet. It also runs a openvpn client (10.0.2.2/24) connected to the EC2 server. i have a selective routing enabled on the router so some especific websites are routed through the openvpn client and the ec2. the rest of the websites are normally routed through regular router wan

Expected Behaviour:

i would like all the dns queries, no matter if there are made by regular clients or my home router to be shown on the query as if

Actual Behaviour:

when checking the pihole query log, all dns queries made from the home router (10.0.2.2) are shown that are made by localhost instead. this is what i need to change.

if i connect directly to ec2 server with a windows or ios openvpn client, dns queries will be correctly shown that are made by the client (example: 10.0.2.10). this is that i want to see.

Debug Token:

bmo5stbb44

thanks for pointing this information.
on the openvpn server conf, im pushing these parameters

push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 10.0.2.1"

all clients show as DNS the address 10.0.2.1 which is what i want. Also the router, which is acting as a openvpn client as well.
the issue is when the router passes dns requests from lan clients through its openvpn client. here is where i get the localhost on the pihole queries.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.