All Questions

Tagged with
Filter by
Sorted by
Tagged with
0
votes
0answers
7 views

Hostapd with DNS rerouting

I have an old Mac Mini running Debian Stretch where I have bridged the wifi interface to the ethernet interface like so (/etc/network/interfaces): source /etc/network/interfaces.d/* # The loopback &...
0
votes
1answer
70 views

iptables redirect dns to proxy

Can we redirect DNS (tcp/udp) requests to Squid proxy in non-transparent mode (3128) using iptables? (Would the squid proxy understand this and process it?) example rule to redirect tcp 53 (It could ...
1
vote
1answer
206 views

Redirect all outgoing DNS queries to local stub resolver at 127.0.0.1:53

I am attempting to redirect all outgoing DNS queries on my Linux box to my local caching stub resolver (unbound). iptables -t nat -A OUTPUT -p tcp --dport 53 -j DNAT --to 1.1.1.1:53 iptables -t nat -...
3
votes
2answers
207 views

Compare domain blocking by iptables vs dnsmasq-/etc/hosts

I now use dnsmasq, with a large /etc/hosts file obtained from Energized packs [https://energized.pro/#packs]. Some of these are quite large. Trying to get info from the dnsmasq team, which is still ...
0
votes
1answer
65 views

Block or drop DNS requests within forwarded packets

I have a default Debian 9 installed in minipc, which is forwarding packets further. I wish to be able to block hosts via domains, means if any forwarded packet of DNS type has request for example of ...
-1
votes
1answer
40 views

How to forbid my PC in LAN to make DNS queries? (in a PC -> VPN gateway scenario)

scenario: i have 2 pc's that are connected to each other over ethernet in a lan and one of the pc's is configured as a gateway that tunnels the traffic of the other pc over to a vpn service. ...
0
votes
1answer
114 views

Debian 9 allows hidden DNS queries?

In previous Debian Jessie I could configure iptables to restrict DNS traffic to my own router (192.168.1.1): Chain OUTBOUND (1 references) target prot opt source destination ...
1
vote
2answers
604 views

Iptables masquerade breaks dns lookups

I'm testing something with IP masquerade on locally generated traffic but it seems to be breaking DNS lookups. Everything else works fine--all IP traffic without DNS queries work. $ iptables -t ...
0
votes
1answer
258 views

Why iptables is flowing? [closed]

I have iptables configuration: # iptables -L Chain INPUT (policy DROP) target prot opt source destination Chain FORWARD (policy DROP) target prot opt source ...
0
votes
2answers
1k views

Mangle rule for intercept DNS traffic form specific IP and redirect to another DNS server - openwrt

I have media box in my network that hard coded to use specific DNS servers like Google DNS. But I want force this device to use my own DNS servers instead of hard coded DNS. Only way I think this is ...
0
votes
0answers
266 views

connection refused ssh and dns

I cannot to ssh or nslookup to this machine vm1 that has the ip 192.168.56.2 from ferrari which has the ip 172.45.20.3. I do not know why, but I am able to ssh to the 192.168.56.2 from my host machine....
0
votes
1answer
517 views

How to block https website with iptables?

I want to block some https website like youtube.com, facebook.com. I know that we can't block that using url rules. since the url is encrypted. So I tried to block all DNS queries which contain the ...
0
votes
3answers
141 views

IPTABLES CODE ISSUE

I am using iptables to block all the ports. However to allow ping www.google.com I am using the following code filter -A INPUT -p tcp --dport 53 -j ACCEPT filter -A OUTPUT -p tcp --sport 53 -j ...
1
vote
0answers
580 views

Openwrt Force DNS

I am working with some content filtering using openDNS. I am trying to get openwrt to redirect traffic for certain clients, based on MAC addresses, to openDNS servers. Here is my setup: openwrt ...
2
votes
0answers
383 views

Temporary DNS resolve to local ip (for temporary http redirect)

So here is my high level goal: I have Linux running on a small device that acts as a Wifi-Hotspot for wireless clients. It also runs a web server (nginx) for configuration and I would like to ...
1
vote
0answers
58 views

Jail outgoing DNS queries to single group with iptables does not work

I am trying to block all DNS queries from my machine by default, and only allow them for specific group of users. I try these rules: sudo su groupadd dns-allowed iptables -A OUTPUT -p udp --dport 53 -...
1
vote
0answers
43 views

DNS Issue - Trying to make a LiFi Router

I am trying to make a VLC/LiFi router using 2 beaglebones and additional circuitry. They are running on Debian based Linux. One is to act as the router for the other. The router has an Ethernet cable ...
5
votes
2answers
760 views

How to override dns server in nat gateway (iptables)

I have an Ubuntu server running openvpn, and iptables is used to push all incoming traffic through the vpn server. The IP tables config is very basic, and generated with the following series of ...
3
votes
0answers
126 views

Per-user DNS settings for VPN

My system's set to send only a particular user's traffic through a vpn (via iptables and --uid-owner). It works fine, but that user's DNS leaks onto the open net. Any way to send only one user's DNS ...
2
votes
0answers
226 views

Need for IPTables expert, possibly with knowledge of u32 module

A customer is sending queries against DNS root-servers on my recursive DNS server. I need to block it with iptables. I tried 3 examples but it is not working. 0 0 DROP udp -- * * ...
1
vote
2answers
5k views

IPTables - hex string block DNS query

I have a customer that is sending a lot of queries for a particular domain on my DNS server. I want block that queries and I found the hex string that is possible to be implemented. That is the string:...
0
votes
1answer
566 views

iptables resolved addresses differs from nslookup

To block personal emails on a corporate network, I've blocked FORWARD to mail.google.com and mail.live.com. The following is how iptables resolved those addresses: $ sudo iptables -L Chain FORWARD (...
0
votes
0answers
275 views

enable/disable domain redirection

My router can be joined by clients. enable // I'd like to redirect all traffic to an IP (13.37.42.1), I mean any IP and any domain. disable // Then I d like to be able to disable it. Then clients ...
1
vote
1answer
797 views

iptables, differentiate ports based on hostname

Is there a way, using iptables, to ACCEPT traffic from HOSTNAME1, HOSTNAME2, HOSTNAME3 to port 22 and FORWARD traffic from everyone else to a different port and make the rule persistent? HOSTNAME1/2/...
1
vote
1answer
759 views

BIND/DNSMASQ query hanging on ubuntu server 14.04.1

I'm testing out a BIND and DNSMASQ configuration on my VPS. When I run a program which submits a bunch of queries (around 10-20 per second) my DNS replies stop coming back for a random amount of time. ...
1
vote
0answers
211 views

Forwarding DNS traffic for specific domain

I'm trying to control which IP address I use for DNS based on the domain string. I'm on Fedora with firewalld and have tried the command: firewall-cmd --direct --add-rule ipv4 filter PREROUTING 0 -t ...
3
votes
1answer
3k views

How to completely block a website like Facebook?

I'm trying to block Facebook access from my home system (Ubuntu). I could add facebook.com to /etc/hosts, but that would only prevent accessing facebook.com. There are many other ways I could use ...
1
vote
2answers
3k views

ping: unknown host with iptables enabled

I can't ping www.google.com. However I can ping the IP address: ping 74.125.237.142 At first, I thought it is a problem with my DNS settings. But I checked my resolv.conf, hosts, and hostname ...
21
votes
5answers
54k views

Iptables to redirect DNS lookup IP and Port

I have discovered that my ISP (verizon) is intercepting all DNS traffic on port 53. Using iptables, I want to redirect all DNS lookup traffic to a specific IP and Port (5353). Any attempt for my ...
0
votes
2answers
5k views

My Centos Server cannot resolve the DNS host name [closed]

My Server OS: Centos 6.3 x64. The server iptables is: *filter :INPUT DROP [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT -A INPUT -p tcp -m tcp --dport ...
6
votes
2answers
6k views

Why is my computer trying to send ICMP type 3 to OpenDNS?

In my firewall logs I see lots of entries like this. IN= OUT=eth0 SRC=192.168.1.105 DST=208.67.220.220 LEN=148 TOS=0x00 PREC=0xC0 TTL=64 ID=55705 PROTO=ICMP TYPE=3 CODE=3 [SRC=208.67.220.220 ...
3
votes
2answers
2k views

How can I Forward a subDomain to a specific port?

My apologies if this has been asked before. I haven't found an adequate solution so... yeah. When a specific domain, "example.com" is accessed, I want it to act normally. In other words, it should go ...