Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Trouble managing ports from the command line Post 302840185 by syregnar86 on Monday 5th of August 2013 01:23:04 AM
Old 08-05-2013
Trouble managing ports from the command line

What are the commands to manage ports from my command line.

Example:

Opening Ports, Closing Ports, Viewing their status, etc.

I am having a hard time finding this answer. I'm trying to trouble shoot some networking problems and it would be very helpful if I could just do this from the command line.
 

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

trouble using mailx command

Hi. I have been trying to send mail using the mailx command. I also tryed to use the mail command. The thing is that when I try to send the email, i receive automatically to my mailbox a DAEMON response sayng that the mailhost is unknown... The syntax I am using is this: $mailx -s "this... (2 Replies)
Discussion started by: ldrojasm
2 Replies

2. UNIX for Dummies Questions & Answers

command to view ports being used

Is there a command that will show me all ports being used? I thought maybe the "lsof" command would show me, but I'm not seeing anything. Thanks, Jeff (2 Replies)
Discussion started by: lawadm1
2 Replies

3. Shell Programming and Scripting

Command to set ports

Hi to everyone here, I have wrote a script to install and set up parental controls with dansguardian and tinyproxy,(fedora) it works quite well except that i have to manually set http proxy to 127.0.0.1 and port 8080 in firefox, is there a way to do this by command line/script? Id appeciate any... (2 Replies)
Discussion started by: dave123
2 Replies

4. Shell Programming and Scripting

sed multiple line trouble

Hello, im writing a script that validates a URL (the parameter) using http://validator.w3.org first it downloads the site (the output line I want is stored in the h2 field of the site's html. wget http://validator.w3.org/check?url=$1 2> /dev/null sed -n '/<h2/p' check?uri=$1 | sed 's/... (5 Replies)
Discussion started by: drareeg
5 Replies

5. Shell Programming and Scripting

Managing awk return code over SSH command

Hello all, This bellow code works. I'm just trying to find a simplified way to achieve this. I'm sure there is an easier way and it must be to simple for me to find. Verify that the OS version is 6.1. If not exit the script. Of course if i just put a && exit 1 at the end of the ssh... (11 Replies)
Discussion started by: maverick72
11 Replies

6. Homework & Coursework Questions

trouble understanding file option and command line arguments

Hi, I am creating a program with the C language that simulates the WC command in Unix. My program needs to count lines, bytes and words. I have not added the code to count bytes and words yet. I am having trouble understanding what the file option/flag '-' does. I can not visualize how it moves... (1 Reply)
Discussion started by: heywoodfloyd
1 Replies

7. Shell Programming and Scripting

Trouble with awk command

Hi, I need to read a string with ; separated using loop one filed by one field and perform some operation. Can you please check and let me know how to print command parameterised. key=phani;ravi;kiran number_of_keys=`echo $key|awk '{print NF}' FS=';'` for (( i = 1; i <= $number_of_keys;... (4 Replies)
Discussion started by: Ravindra Swan
4 Replies
PORTSNAP.CONF(5)					      BSD File Formats Manual						  PORTSNAP.CONF(5)

NAME
portsnap.conf -- configuration file for portsnap(8) DESCRIPTION
The portsnap.conf file controls where portsnap(8) fetches ports tree snapshots from, which RSA key should be trusted to sign the updates, and what directories should hold the compressed and live ports trees. A line of the form SERVERNAME=portsnap.example.com specifies the source from which snapshots should be fetched. This is equivalent to the -s server option to portsnap(8), and will be ignored if the command-line option is used. A line of the form KEYPRINT=0123456789abc ... 456789abcdef (64 characters in total) specifies the SHA-256 hash of the OpenSSL public key file belonging to an RSA keypair which is trusted to sign updates. This is equivalent to the -k KEY option to portsnap(8), and will be ignored if the command-line option is used. A line of the form WORKDIR=/path/to/workdir specifies the directory in which portsnap should maintain its compressed snapshot of the ports tree. This is equivalent to the -d workdir option to portsnap(8), and will be ignored if the command-line option is used. A line of the form PORTSDIR=/path/to/portstree specifies the directory in which portsnap will create the live ports tree from its compressed snapshot via the extract and update commands. This is equivalent to the -p portsdir option to portsnap(8), and will be ignored if the command-line option is used. If more than one line of any of the above forms is included in portsnap.conf then only the last one will take effect. A line of the form INDEX INDEXFILE DESCRIBEFILE will instruct portsnap(8) that the specified INDEX file is generated from the specified describe file distributed by the portsnap server. Finally, a line of the form REFUSE foo bar will instruct portsnap(8) to ignore parts of the ports tree with paths starting with foo or bar, which are interpreted as extended regular expressions by egrep(1). This will result in those parts of the tree not being updated in the compressed snapshot when the fetch and cron commands are used and not being extracted when the extract command is used (unless a specific path is passed to portsnap(8)), and if those parts of the ports tree are present they will not be updated when the update command is used. Unlike the other options, the parameters in REFUSE lines accumulate and all such lines are considered. Note that operating with an incomplete ports tree is not supported and may cause unexpected results. Any lines not of the above forms will be ignored. FILES
/etc/portsnap.conf Default location of the portsnap configuration file. SEE ALSO
egrep(1), fetch(1), portsnap(8), sha256(8) AUTHORS
Colin Percival <cperciva@FreeBSD.org> FreeBSD January 30, 2005 FreeBSD
All times are GMT -4. The time now is 01:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy