Jump to content

jiggi

Members
  • Posts

    0
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

jiggi's Achievements

Newbie

Newbie (1/14)

  1. Hi all, I'm trying to spoof dns in a static network based on the original script. So far, I've spent hours on it without any results - and I don't know why... From my understanding, I would have to do it as such: Let's say I have a network in 192.168.1.0/24 with one router in 192.168.1.1 and my host is 192.168.1.50. 1) set a static IP on eth0 which mimics the router (example: 192.168.1.1) --> uci set network.lan.ipaddr="192.168.1.1" 2) set a static IP on eth1 which mimics my host on the network (example: 192.168.1.50) --> uci set network.wan.ipaddr="192.168.1.50" And then let the script do it's own stuff with the dnsmasq address and the iptables. The whole script would look like this: #!/bin/bash function setup(){ uci set network.lan.ipaddr="192.168.1.1" uci set network.wan.ipaddr="192.168.1.50" sleep 5 cp $(dirname ${BASH_SOURCE[0]})/spoofhost /tmp/dnsmasq.address &> /dev/null /etc/init.d/dnsmasq restart } function run(){ iptables -A PREROUTING -t nat -i eth0 -p udp --dport 53 -j REDIRECT --to-port 53 } setup run
×
×
  • Create New...