Sponsored Content
Special Forums IP Networking How to block domains that match a keyword? Post 303010099 by bakunin on Tuesday 26th of December 2017 05:38:58 PM
Old 12-26-2017
Quote:
Originally Posted by milhan
For example, if you want to block example.com you add the following lines in your /etc/hosts file:
What you need is a firewall, like the one Scrutinizer has suggested.

Notice that the way you describe you do NOT "block" any domain, you just make sure that the name associated with the domain cannot be reliably translated into an IP-address any more. This is more like painting over a certain name in the telephone book with a black marker: you cannot look up the name and its associated number any more, but everybody who knows the telephone number (or has other means to find it out) could still call it.

I hope this helps.

bakunin
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

multiple domains

Hello, I have 3 domains virtually hosted "name based" the first one "domain1.com" has its ServerName entered as domain1.com. this domain will load in a browser by www.domain1.com or simply domain1.com. the next two domains "domain2.com" and "domain3.com" ServerNames are listed as domain2.com and... (2 Replies)
Discussion started by: ericg
2 Replies

2. UNIX for Dummies Questions & Answers

blocking domains

Dear All , Kindly note I have sun solaries 7 . I want to block a domain who keep sending emails to my domain and users . thanks (1 Reply)
Discussion started by: tamemi
1 Replies

3. Shell Programming and Scripting

Match keyword on string and substitute under vi

Hi guys, with sed when I need to make a substitution inside a line containing a specific keyword, I usually use: sed '/keyword/ s/cat/dog/g' This will substitute "cat" with "dog" on those lines containing "keyword". Now I want to use this inside vi, for several reason that I cannot... (2 Replies)
Discussion started by: lycaon
2 Replies

4. Shell Programming and Scripting

delete block of lines when pattern does not match

I have this input file that I need to remove lines which represents more than 30 days of processing. Input file: On 11/17/2009 at 12:30:00, Program started processing...argc=7 Total number of bytes in file being processed is 390 Message buffer of length=390 was allocated successfully... (1 Reply)
Discussion started by: udelalv
1 Replies

5. Shell Programming and Scripting

SED, match a line block

Hello, I want to do a simple substitution using sed but I can't find a solution. Basically, from a Apache conf file, I would like to remove everything included between the <VirtualHost> and </VirtualHost> e.g SSLMutex file:/var/run/ssl_mutex <VirtualHost _default_:443> # A lot of config that... (5 Replies)
Discussion started by: RobertFord
5 Replies

6. UNIX for Dummies Questions & Answers

Sub domains from report

Hi, I have a report containing severals organization's email address. The address contain several sub domains, and i need to pull those out. mail domain ( example.com) .................. The report column contain mail address in this format : john1@sub1.example.com... (2 Replies)
Discussion started by: john_prince
2 Replies

7. Shell Programming and Scripting

Using sed to pattern match within a particular multiline block and take action

Hi all, This is my first post, so please go easy if I broke some rules. Not accustomed to posting in forums... :) I'm looking for help on pattern matching within a multiline block and looking to highlight blocks/block-ids that do NOT contain a particular pattern. For example an input file... (5 Replies)
Discussion started by: tirodad
5 Replies

8. Shell Programming and Scripting

Search for a Keyword in file and replace another keyword or add at the end of line

Hi I want to implement something like this: if( keyword1 exists) then check if(keyword2 exists in the same line) then replace keyword 2 with New_Keyword else Add New_Keyword at the end of line end if eg: Check for Keyword JUNGLE and add/replace... (7 Replies)
Discussion started by: dashing201
7 Replies

9. IP Networking

VLANs and their domains

Hey everyone. I work in a data center, and I'm working on getting my CCNA. Now when I read articles on the idea of VLAN's it makes sense. Especially if you have multiple switches daisy chained in multiple locations. My two main questions though are that most of these examples use PC's as examples... (2 Replies)
Discussion started by: Lost in Cyberia
2 Replies

10. Shell Programming and Scripting

awk to match keyword and return matches and unique fields

Trying to use awk to find a keyword and return the matches in the row, but also $1 and $2, which are the unique id's, but they only appear once. Thank you :). file name 31 Index Chromosomal Position Gene Inheritance 122 2106725 TSC2 AD 124 2115481 TSC2 AD 121 2105400 TSC2 AD... (6 Replies)
Discussion started by: cmccabe
6 Replies
Dialcodes(4)						     Kernel Interfaces Manual						      Dialcodes(4)

NAME
Dialcodes - Contains the initial digits of telephone numbers used to establish remote connections over a telephone line SYNOPSIS
/usr/lib/uucp/Dialcodes DESCRIPTION
The /usr/lib/uucp/Dialcodes file contains the initial digits of telephone numbers used by the uucp program to establish remote connections over a telephone line. The Dialcodes file simplifies entries in the /usr/lib/uucp/Systems file for sites where a number of device tele- phone numbers have the same prefix. If users at your site communicate regularly by way of telephone lines and modems to multiple systems all located at the same remote site, or to multiple systems located at different remote sites, use dial-code abbreviations in the /usr/lib/uucp/Systems file rather than entering the complete telephone number of each remote modem in that file. The Dialcodes file contains dial-code abbreviations and partial telephone numbers that complete the telephone entries in the /usr/lib/uucp/Systems file. Entries in the Dialcodes file contain an alphabetic prefix attached to a partial telephone number that may include the following information, in the order listed: Codes for an outside line. Long-distance access codes (1 and the area code, if the modem is out of the local area). The 3-digit exchange number. The relevant alphabetic prefix (representing the partial telephone number), together with the remaining four digits of that number, is then entered in the Phone field in the /usr/lib/uucp/Systems file. Following is the form of an entry in a Dialcodes file: DialCodeAbbreviation DialingSequence The DialCodeAbbreviation part of the entry is an alphabetic prefix containing up to eight letters, established when setting up the dial- code listing. The DialingSequence comprises all the digits in the number that precede the actual 4-digit telephone number. Note that if your site uses only a relatively small number of telephone connections to remote systems, include the complete telephone num- bers of the remote modems in the /usr/lib/uucp/Systems file rather than using dial-code abbreviations. Enter each prefix only once in the Dialcodes file. When you have set up a dial-code abbreviation, use that prefix in all relevant entries in the /usr/lib/uucp/Systems file. Only someone with superuser authority can edit the Dialcodes file, which is owned by the uucp program login ID. EXAMPLES
The Dialcodes file on system venus contains the following dial-code prefix for use with a number in the /usr/lib/uucp/Systems file: local 9=555 The Systems file on system venus contains the following entry for system zeus, including a telephone number and a dial-code prefix: zeus Any ACU 1200 local1212 in:--in: nuucp word: thunder When the uucp program on system venus dials system zeus, it uses the expanded telephone number =5551212. FILES
Contains all the configuration files for the uucp program, including the Dialcoddes file Contains information about available devices Spec- ifies initial handshaking on a connection Describes accessible remote systems RELATED INFORMATION
Commands: cu(1), tip(1), uucp(1), uuto(1), uux(1) delim off Dialcodes(4)
All times are GMT -4. The time now is 11:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy