Software :: Vps Running Every Minute That Checks To See Whether Or Not A Certain Port Is Open On Localhost?
Oct 30, 2010
I have a crontab on my vps running every minute that checks to see whether or not a certain port is open on localhost. If the port isn't open, it should run the php script to restart the program. However, I require the use of screen to be able to interact with the program whenever I reconnect to the vps through shell.The problem is, screen is being a pain by saying "Must be connected to a terminal."This is the php script:
Made some network and hardware changes, and now I can't get the mailserver to work. It seems that sendmail can't loop to itself on 127.0.0.1. When I nmap localhost, I find that port 25 isn't open.
Naturally, nothing has changed on my system except for different routing, interfaces, etc.
So the question for sendmail gurus,is where should I be looking?
I have a problem with one of my new OpenSuse installation. I install ntop on this machine so the port 3000 become open, but when i want to use it on a other pc, it cannot see the open port. I really don't understand why i cannot access this port.
I disabled firewall to make sure everything pass.
Here my ntop on my localhost
Nmap done: 1 IP address (1 host up) scanned in 0.07 seconds
Here my ntop from another host
Nmap done: 1 IP address (1 host up) scanned in 0.07 seconds
I have two computers on a LAN. (This is history not a Bazaar question, although I have one of those too) One of them (Ubuntu 9.04) Im using as a Bazaar repository over sftp. Its been working fine for about a year. Then we had a thunderstorm that knocked out our Internet service for a couple of days. When it came back up everything is working fine accept I could no longer commit to the server. A little detective work showed that ssh was not running on the server. I started it and Bazaar then couldnt find the repository files. I still suspected an ssh problem, but port scans from both computers showed port 22 open on the server and I could do a ssh login from the client ok. Then I started fiddling with ssh on the server and now I have ssh problems on top of the Bazaar problems.
On the server I deleted then regenerated the ssh keys. Ive done sudo /etc/init.d/ssh reload sudo /etc/init.d/ssh start
I get a normal starting message and ps ef |grep ssh
shows /usr/sbin/sshd running. But the port scan does not show 22 open and I get connection refused at the client.
Previously I had posted a question on how to make it run every 7 minutes between 7 and and 11pm.However now I found out what I really need is every 7 minuted between 7:30 and 11pm BUT it has to be every 7 minutes, it cannot reset itself on the top of every hour, so the */7 wont work.How can it that it will be every 7 minutes, so it will go at 7:30, 37,44,51, 58, 8:05, etc..
I have an installation of Fedora 10 that has been running wonderfully for months, ever since I bombed my 9 installation trying to install Apache Tomcat (I really just wanted Apache, live and learn). I finally decided to brave the attempt to install Apache 2.2 again because I have a little more instruction to go by. Apparently not enough to deal with this snag though, at least not the way I want.
Install went fine, but I couldn't start the service. Following the error trail I found that it was binding IPv6 to port 80 and wouldn't allow any other ip or localhost to use it. I disabled IPv6, don't need it, I'll learn about it later.
Now when I try to connect to the localhost at port 6667 using irssi, i get the following error message saying it cannot connect to localhost port 6667
13:48 -!- Irssi: Looking up localhost 13:48 -!- Irssi: Connecting to localhost [127.0.0.1] port 6667 13:48 -!- Irssi: Connection to localhost established 13:48 -!- Error: bind: Permission denied 13:48 -!- Error: listen: Bad file descriptor 13:48 -!- Irssi: Connection lost to localhost
A similar looking error comes up when I try to telnet localhost at 6667. Also, I get a selinux warning saying SELinux is preventing /usr/sbin/bitlbee "name_bind" access .How do I check if bitlbee is listening to port 6667? Btw, I am using fedora 13, I have selinux running in enforcing mode and the firewall running. I have set the port 6667 in the other ports tab of "system-config-firewall" (I am hoping that this will open that port).
If I forward port 80 to port 3128 for squid with an iptable rule, does port 3128 have to be open on the firewall or is this all routed behind the firewall?
I'm trying to connect to my linux server but I'm having some major problems. The server had OEL 5 installed and my local pc is running Windows XP. I'm using PuTTy to connect to the server with Xming running on my loacl machine. I login as root and run the following command - export DISPLAY={ipaddress}:0.0I then run xclock and get the following error - Xlib: connection to "{ipaddress}:0.0" refused by serverXlib: No protocol specifiedError: Can't open display: {ipaddress}:0.0The strange thing is that on my bosses pc (who has got almost the exact same setup ie. PuTTy & Xming) is works perfectly.
I have sendmail running on my centOS 4.6. My lamp server also runs on it. I want to send mail through php mail function. when i execute php page, which fires the mail function, it takes so much long tim1 say even 1 minute, and at last displays that message sent successfully. Suppose, destination address is [URL].... I did not get any mail there. My server is running in LAN. I checked the status of sendmail, it shows me that it ios running. when i issue "nmap localhost" it shows me that SMTP port 25 is open, but when i issue "nmap myserver" (192.168.1.20 myserver ( written in hostfile)), it does not show that SMTP port is open.
I checked the /var/log/maillog, one person in my previous post advice me to see that. There it shows that message is accepted for delivery...but i do not get any mail in my destination, even not in spam folder. One more confusion is that, in my case my server is in LAN and if I am at all enable to open the SMTP port on it, does i need to open SMTP port on my router (which connects my LAN to internet) also needs to open? I think no, because SMTP is application layer protocol, it will wrap my mail in IP packet, which router just need to forward. am i right?
I was trying to remotely log in to my desktop which uses 11.3 from my laptop via ssh. For some reason I get an empty field for the command echo $DISPLAY. and as a result an xclock command results in error: can't open display. I tried to set it to localhost:10.0 and I get: Error: Can't open display: localhost:10.0
I've tried :0.0 and I get: Invalid MIT-MAGIC-COOKIE-1 keyError: Can't open display: :0.0 ssh used to work about a week ago before I performed various security updates. I was wondering what' the solution to this. I checked the /etc/ssh/sshd_config file and ssh_config file both have X11 forwarding on. Can anyone with more experience out there give me any ideas?
When I attempt to use Putty for xterm (to run DBCA for Oracle) I check x11 and put my IP Address in the Display field of putty. However, when I then try to execute ./dbca I receive the following:
Xlib: connection to "localhost:10.0" refused by server Xlib: PuTTY X11 proxy: wrong authentication protocol attempted Error: Can't open display: localhost:10.0
I notice the following when logging in to the server as well.
Last login: Fri Mar 19 13:51:19 2010 from 10.47.48.33 /usr/X11R6/bin/xauth: error in locking authority file /home/oracle/.Xauthority. These are the same steps I take successfully on all the servers. The above file exists on the servers I can initiate the GUI, but not on <server1>.
Ok For some reason I open my ports in security and firewall. I open ssh and other ports and port 7001 for example but when I go to check to see if they are open or try to connect to them. It shows that they are still closed. I am using - [URL] Also yes my ports are open on my router. I know my router works fine with opening ports because I have shoutcast setup on another computer with xp that is currently running. I am willing to pay for who can ever get this fixed for me...
I have worked with xampp on windows. Its my first time with Red Hat Enterprise Linux 5 .
Problem Is In My company we have redhat entprise 5 and its running well with samba server for our intranet. I wants to upgrade the intranet by using joomla. Problem is i have installed the xampp succesfully but when i type [url] it still opens our old intranet's homepage.
how to access a FTP server with php. I've written a script from a tutorial but I'm getting errors with the ftp_get function.
PHP Code:
[code].....
Warning: ftp_get() [function.ftp-get]: Error opening /var/www/download.txt/ in /var/www/gwr/connect.php on line 11
I'm having trouble with the ftp_get function and I believe the problem is with the local server path. In this case var/www/download.txt I've also used a folder in that directory called download in the place of the .txt file and it gives the same errors. Is var/www/ the correct path to tell php where to download the files to? I've experimented with the files permission and nothing has worked. I'm running a standard ubuntu desktop install, Karmic Koala.
and I have the PHP5 module installed. I vaguely recall that I may have had PHP4 installed - would the upgrade have removed it? Is there anywhere I can get it from to try? Anything else to do?
It complains that it can't connect to localhost because probably libvirtd is not running. Well it is running, so please share your wisdom with me. Here is error message:
I did a fresh install of Lucid 32bit and install LAMP via Mark packages by task *LAMP server...Everything worked fine I could view files via firefox php an all worked... I did the system updates ( since clean install ) and went on a software getting spree... Then I tried to get back to my work on web site and I can no longer connect to localhost via firefox... 127.0.0.1 doesn't work either I tried to restart apache2 and still nothing.
I hear that it's a bad idea to edit iptables by hand.
I want to open 443. Quote: iptables -A INPUT -p tcp -m tcp --sport 443 -j ACCEPT iptables -A OUTPUT -p tcp -m tcp --dport 443 -j ACCEPT Since I'm not at the box, I can't use the nifty GUI.
from my windows box at work i can only connect to some ports (pop3, telnet, web)also, i can connect to port 1234 (as an example)everything else is blocked.I'm trying to connect with Microsoft Terminal Service Client to my linux box (cant install any vnc)but haven't found a way to make Gnome remote desktop to listen to the port i need (1234).I'm using fedora 13.anyway, i would appreciate any advice on what software to use or hot to configure my Linux box get remote connections from windows box on that certain port.
On our server port 25 is open for sending email. I want to open port 587 too in our firewall.If I have open tow ports 25 and 587 for out going email it is not going to make any problem? my server is Centos 5 I am using webmin to access to our server.
I don't find a lot of information available regarding a service called pipe_server.When I send UDP packets without specifically a source or destination port, the packet capture from the machine, I send the UDP packet shows the following:
src port: pipe_server(2010) dest port: pipe_server(2010)
More information related how send packets : I use raw sockets. I don't specify ports.Does the kernel fill the src and dest ports for me? Do all machines have a port 2010 that will listen for UDP packets?
I know this has got to be a beginners question but I can not find the answer. I have searched the forum, the wiki, and the reference. I have used google and found the answer as it applies to red hat but doesn't work in debian. Found a couple of more but they didn't work either. I need to open a port for ssh to work. I have it working on 3 computers but the 4th has the port closed and I can't open it. I have openssh client and server installed and running. I am using Wheezy/testing on an acer laptop.