What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

route domain to different ip for a specific mac

dimitris

New Around Here
I would like to route an existing domain to a different ip address but only for a specific mac (or ip) address.
I have found this: https://github.com/RMerl/asuswrt-merlin/wiki/Custom-domains-with-dnsmasq , but it applies to all lan clients.

Actually, the case is as follows:
A domain (eg. www.xxxx.com) is not pingable.
A specific lan client must get a reply when pinging that domain.

Ideally, I just want the specific domain to be pingable only from the specific lan client (and not routing that domain).
Any idea on how could I achieve this?

----------------------------
Ok, after searching a bit, this appears to be a solution:
iptables -t nat -A PREROUTING -p icmp -m mac --mac-source xx:xx:xx:xx:xx:xx -d www.xxxx.com -j REDIRECT
 
Last edited:

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top