jasmine3051
24.06.2021 •
Computers and Technology
You have configured the following rules. What is the effect? sudo iptables -A INPUT -p tcp --dport 25 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT sudo iptables -A OUTPUT -p tcp --sport 25 -m conntrack --ctstate ESTABLISHED -j ACCEPT
Solved
Show answers
More tips
- F Food and Cooking What Does a Godmother Give?...
- H Health and Medicine Simple and Effective: How to Get Rid of Cracked Heels...
- H Health and Medicine Relieving Swelling in Legs: Causes and Ways to Alleviate the Symptom...
- W Work and Career Мерчендайзинг – все, что нужно знать...
- O Other Everything You Need to Know About Kudyabliks...
- F Food and Cooking How to cook crayfish? Everything you need to know...
- F Food and Cooking Homemade kvass: recipe and brewing process...
- H Health and Medicine How to Choose the Right Tanning Cream?...
- S Style and Beauty Secrets of Tying a Pareo: 5 Ways...
- S Sport Running: How to Do It Right?...
Answers on questions: Computers and Technology
- C Computers and Technology If a DBMS enforces a DELETE CASCADE option on the referential integrity constraint between CLIENT and AGENT in the HAPPY INSURANCE database, what will be the outcome after a user tries...
- E English Education in America was determined by class, race and...
- M Mathematics Attractive or no? btw asking for a friend lol...
- H Health How can regular physical activity bring enjoyment or a person s life...
- M Mathematics 17. What are the mean, median and range for Jackson High School (write all three answers in the blank below and label each) * 3 points Weights in pounds of the starting linemen of...
- H History I dont know what to do...
- S Social Studies What was an effect of the US government selling war bonds? O Citizens received government loans to support them during the war. Citizens saw immediate returns on their investments....
- E English i love bqwq8waY^U&y4iy4i6jyyhhuyuyhuj4ybyjuyjuy ujyz jyuzujyzuzjxy zuxuzuz zu uzjuzzuzuxzua6x8zuzu67x uzx67 czjxz6j7u8uz8uz8uz678uzj8uzxzux8j czx8ujzxuj xuzjxzu8 z8ux 7uzx u8u78uzx8u...
- H History When did Thomas Edison first make his impact on culture and society? O in the second half of the 1700s O in the first decade of the 1800s O in the beginning of the 1900s in the mid-1900s...
- M Mathematics Will give brainlist Need the answer thx!...
Ответ:
Allow Simple Mail Transfer Protocol (SMTP) traffic. Since SSH is on TCP port 22, these rules will have no effect on SSH.
Explanation:
Allow Simple Mail Transfer Protocol (SMTP) traffic.
Inbound and outbound SMTP connections on TCP port 25, which is SMTP's default port, would not be prevented by these rules.
These rules use the Accept action to ensure that Simple Mail Transfer Protocol (SMTP) and Secure Shell (SSH) are not blocked.
Since SSH is on TCP port 22, these rules will therefore have no effect on SSH.
Ответ:
import java.util.Scanner;
public class Main
{
public static void main(String[] args) {
//print the header
System.out.println("");
System.out.println("* *");
System.out.println("* *");
System.out.println("* Gas-N-Clean Service Station *");
System.out.println("* *");
System.out.println("* March 2, 2004 *");
System.out.println("* *");
System.out.println("");
//set the constant values for gasoline
final double REGULAR_GASOLINE = 2.89;
final double PLUS_GASOLINE = 3.09;
final double SUPER_GASOLINE = 3.39;
// initialize the variables as 0
double gasolinePrice = 0, gasolineCost = 0, carWashCost = 0, totalCost = 0;
Scanner input = new Scanner(System.in);
//ask the user to enter the gallons, gas type and car wash choice
System.out.print("Enter number of gallons ");
double gasolinePurchase = input.nextDouble();
System.out.print("Enter gas type (R, P, S, or N) ");
char gasType = input.next().charAt(0);
System.out.print("Enter Y or N for car wash ");
char carWashChoice = input.next().charAt(0);
//check the gas type. Depending on the choice set the gasolinePrice from the corresponding constantvalue
if(gasType == 'R')
gasolinePrice = REGULAR_GASOLINE;
else if(gasType == 'P')
gasolinePrice = PLUS_GASOLINE;
else if(gasType == 'S')
gasolinePrice = SUPER_GASOLINE;
//calculate the gasolineCost
gasolineCost = gasolinePurchase * gasolinePrice;
//check the carWashChoice. If it is yes and gasolineCost is greater than 10, set the carWashCost as 1.25. Otherwise, set the carWashCost as 3.00
if(carWashChoice == 'Y'){
if(gasolineCost >= 10)
carWashCost = 1.25;
else
carWashCost = 3.00;
}
//calculate the total cost, add gasolineCost and carWashCost
totalCost = gasolineCost + carWashCost;
//print the values in required format
System.out.println("Amount Gasoline purchases " + gasolinePurchase);
System.out.println("Gallons Price per gallons $ " + gasolinePrice);
System.out.printf("Total gasoline cost $ %.2f\n", gasolineCost);
System.out.println("Car wash cost $ " + carWashCost);
System.out.printf("Total due $ %.2f\n", totalCost);
System.out.println("Thank you for stopping\nPlease come again \nRemember to buckle up and drive safely");
}
}
Explanation:
*The code is in Java.
Please see the comments in the code for explanation