Question

Use the firewall-cmd to drop all incoming pings. Try to ping your CentOS machine from your...

Use the firewall-cmd to drop all incoming pings.

Try to ping your CentOS machine from your Mac. It should not work.

Write down the command

Remove the previous rule created (the one from question 1)

Write down the command

0 0
Add a comment Improve this question Transcribed image text
Answer #1
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class PingIP {
public static void runSystemCommand(String command) {
try {
Process p = Runtime.getRuntime().exec(command);
BufferedReader inputStream = new BufferedReader(
new InputStreamReader(p.getInputStream()));
String s = "";
// reading output stream of the command
while ((s = inputStream.readLine()) != null) {
System.out.println(s);
}
} catch (Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
String ip = "google.com";
runSystemCommand("ping " + ip);
}
}
Add a comment
Know the answer?
Add Answer to:
Use the firewall-cmd to drop all incoming pings. Try to ping your CentOS machine from your...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • You are to create and apply a firewall rule set on your Ubuntu server and each...

    You are to create and apply a firewall rule set on your Ubuntu server and each rule should be commented. Make sure to use variables for the IP addresses in your firewall. It's good practice and if I have to test one or more of your rules, I can replace the address in the variable. For any packets you REJECT or DENY, those should be logged. That means you'll need to modify the rule so that if the rule matches...

  • Question 26 (1 point) In Lab 1 (Exploring Encryption), what did you need to configure on...

    Question 26 (1 point) In Lab 1 (Exploring Encryption), what did you need to configure on the server or on the client? Question 26 options: Only (a) and (b) (c) The client's public key (a), (b), and (c) (a) The server's certificate (b) Enable TLS on the server Save Question 27 (1 point) The following question is Lab 2 related (Ports and Firewalls). At what point does the HTTP daemon service actively begin listening for traffic on the network? Question...

  • PLEASE ATTACH A SCREENSHOT OF YOUR SUCCESSFUL PING IN PACKET TRACER FOR THE END!!!!!!!!!!! THANK YOU! Objectives Part...

    PLEASE ATTACH A SCREENSHOT OF YOUR SUCCESSFUL PING IN PACKET TRACER FOR THE END!!!!!!!!!!! THANK YOU! Objectives Part A: Configure a simple static routing . Part B: Configure a simple RIP routing Part A: Configure a simple static routing 1. Create the following network topology on Packet Tracer Router-PT Router-PT Addressing Table Device Interface IP Address Subnet Mask Default Gatewa 10.0.0.1 20.0.0.1 30.0.0.1 20.0.0.2 0.0.0.10 30.0.0.10 N/A 255.0.0.0 255.0.0.0 255.0.0.0 255.0.0.0 255.0.0.0 255.0.0.0 Routero 2/0 NIA NIA NIA 10.0.0.1 30.0.0.1...

  • Approximating With Simpson's Rule 6) Now we want to use Simpson's Rule to find the volume of the machine pa...

    Approximating With Simpson's Rule 6) Now we want to use Simpson's Rule to find the volume of the machine part. Remember that Simp- son's Rule approximates integrals, not just areas. Since we don't just want the area under the radius function, we can't just apply Simpson's Rule to the radius function. If we let f(x) be the radius of the machine part at the point x, write down the integral that gives the volume of the machine part (with an...

  • Describe briefly a database application case of your choice and represent your data in terms of...

    Describe briefly a database application case of your choice and represent your data in terms of 3 linked (via foreign key/s) tables. List their respective primary key and foreign key/s if any. Your database application case should be different from those already covered in the lectures or practicals. For the database case in the Additional Exercises of the previous practical, complete the proper construction of all the 5 tables in SQL, building all the pertinent primary and foreign keys there....

  • My Company for the is ORACLE You will complete your paper. Be sure to use all...

    My Company for the is ORACLE You will complete your paper. Be sure to use all of the revisions suggested by your instructor. This should be a practical presentation that would be used within the organization. This paper should have two large sections. Part one is for the Sales Representatives to help them with sales. Part two is for management. Please incorporate all notes from your instructor from previous submissions. This submission will be one document with two parts that...

  • DROP TABLE EMPLOYEE; DROP TABLE JOB; DROP TABLE EMP; DROP TABLE EMP_1; DROP TABLE EMP_2; CREATE...

    DROP TABLE EMPLOYEE; DROP TABLE JOB; DROP TABLE EMP; DROP TABLE EMP_1; DROP TABLE EMP_2; CREATE TABLE JOB(JOB_CODE CHAR (3) PRIMARY KEY, JOB_DESCRIPTION VARCHAR (20) NOT NULL,JOB_CHG_HOUR NUMBER (5,2) NOT NULL,JOB_LAST_UPDATE DATE NOT NULL); INSERT INTO JOB VALUES('500','Programmer','35.75','20-Nov-2017'); INSERT INTO JOB VALUES('501','System Analyst','96.75','20-Nov-2017'); INSERT INTO JOB VALUES('502','Database Designer','125.00','24-Mar-2018'); CREATE TABLE EMPLOYEE(EMP_NUM CHAR (3) PRIMARY KEY,EMP_LNAME VARCHAR (15) NOT NULL,EMP_FNAME VARCHAR (15) NOT NULL, EMP_INITIAL CHAR (1),EMP_HIREDATE DATE NOT NULL,JOB_CODE CHAR (3), EMP_YEARS NUMBER (2),FOREIGN KEY (JOB_CODE) REFERENCES JOB (JOB_CODE)); INSERT...

  • Spam Filters* Spam filters try to sort your incoming e-mails, deciding which are real messages and...

    Spam Filters* Spam filters try to sort your incoming e-mails, deciding which are real messages and which are unwanted. One method used is a point system. The filter reads each incoming e-mail and assigns points according to the sender, the subject, key words in the message, and so on. The higher the point total the more likely it is that the message is unwanted. The filter has a cutoff value for the point total; any message rated lower than that...

  • SQL Question 2 Using your table from question 1: Create a minimum of 4 INSERTS. On...

    SQL Question 2 Using your table from question 1: Create a minimum of 4 INSERTS. On one of your INSERTs, do not specify all of your columns. In other words, if you have 5 columns in your table, only mention 4 or less columns in one of your INSERTs. Be sure to write a comment above the INSERT with less columns and explain what is missing in a full English sentence. You should write a simple SELECT after your INSERTs...

  • Our 1st new array operation/method is remove. Implement as follows: public static boolean remove( int[] arr,...

    Our 1st new array operation/method is remove. Implement as follows: public static boolean remove( int[] arr, int count, int key ) { 1: find the index of the first occurance of key. By first occurance we mean lowest index that contains this value. hint: copy the indexOf() method from Lab#3 into the bottom of this project file and call it from inside this remove method. The you will have the index of the value to remove from the array 2:...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
Active Questions
ADVERTISEMENT