Ubuntu Networking :: Script To Monitor Connection - VPN Client Disconnected
Jan 22, 2011
My promlem is that I wrote a few simple script to monitor the network connection as follows:
script 1 "netmonitor.sh"
#!/bin/bash
# /usr/local/bin/netmonitor.sh
HOST=www.google.hu
ping -c 1 "$HOST" > /dev/null 2>&1 .....
So it's run every 5 minutes, and it works well, when it sees host is down, it restart the connection, BUT as the log shows below, about a half an hour after using the connection (for example the ssh through the internet or the vpn clients disconnected) , br0 (probably) goes down or something and the script needs always restarting the connection...
The log:
Fri Jan 21 14:45:01 CET 2011 Network is ready! .....
Fri Jan 21 15:55:41 CET 2011 Network seems down, rechecking...
Fri Jan 21 15:56:21 CET 2011 Network is down, restarting interface br0!
Fri Jan 21 15:56:48 CET 2011 Network is ready after interface br0 restart! .....
Then if I use again, its ready... Is it possible, that if system don't use the connection after getting the DHCP lease, it close the connection automaticly? Anyway it works ok, but I don't want to owerwrite my router's flash in every 5 seconds with te new lease, my script probably defeat it soon if I don't do anything.
View 3 Replies
ADVERTISEMENT
Feb 16, 2010
Since I have started to use Ubuntu 9.10, I have had multiple wireless connection troubles. First of all, it says the signal is 2 bars, when in fact my router is right next to me as of right now. Second of all, when I try to connect to it, it asks for my password 3 times, then says disconnected. I'm on a hardwire right now, it's across my keyboard, and I'm in a tangled mess.
View 2 Replies
View Related
Jan 25, 2010
I have an Asus laptop with a BCM4318 wifi chipset. result of lspsci command about wifi cards:
Code:
00:09.0 Network controller: Broadcom Corporation BCM4318 [AirForce One 54g] 802.11g Wireless LAN Controller (rev 02) For some reason, I often get disconnected. Once it's disconnected, I cannot connect anymore and I need to reboot my laptop in order to get the connection back! I didn't have this problem when I was on Ubuntu 8.04. I checked in /var/log/syslog and I found this when the network is disconnected:
[Code].....
View 9 Replies
View Related
Aug 8, 2010
I have installed Fedora 13 and updated it. I simply cant use ssh to connect to this Fedora, not even locally. I have enabled port22 in firewall settings and nothing. Tried to disable firewall completely and nothing. I have disabled SELinux (not sure if it has something to do with this, but... ) and nothing. Entered "ALL: ALL" in /etc/hosts.allow and still nothing. Dont know what to do anymore.
Here is what happens when I try to ssh to this machine, even from it:
[flibio@surf ~]$ ssh localhost
warning: Need basic cursor movement capability, using vt100
flibio's password:
Authentication successful.
Disconnected; connection lost (Connection closed.).
Connection to localhost closed.
[flibio@surf ~]$
Looking into Services > sshd and it says "This service is dead."
So I tried:
[root@surf etc]# service sshd restart
Stopping sshd: [FAILED]
Starting sshd: : OpenSSH_5.4p1 on
: FATAL: Creating listener failed: port 22 probably already in use! .....
And still I get disconnected whenever I try to ssh to this machine from anywhere. Services says that sshd is allways dead, even restarting it but I can only restart it by doing a pkill sshd before.
View 7 Replies
View Related
Apr 19, 2010
I am new ubuntu user . I installed - ubuntu desktop v9.10 32bit. I have BSNL (Indian Telephone service) broadband connection. In Windows 7, BSNL broadband connection is working fine.
Now in ububtu I try to establish ADSL connection using following command: "sudo pppoeconf". It open a console based wizard and I'm able to create the connection. But this connection is sustain hardly 4~3 minute, after that it is disconnected. So, Again i have go through the same process again and again.
View 5 Replies
View Related
Jan 28, 2011
OS: Maverick Ethernet driver: tested with sky2 an sk98lin This has been driving me crazy for the last few months: if I unplug ethernet cable while my laptop is on reconnecting it sometimes does not bring the connection back.
And once ethernet is gone nothing that I try seems to consistently bring it back. Rebooting, disabling/enabling the driver, disabling/enabling NIC in BIOS, changing driver from sky2 to sk98lin, deleting connection from Network Manager, resetting the router - nothing helps. It seems to come back randomly a few weeks later. Once I used live Ubuntu on a USB stick and ethernet came back not only on a live distro but then when I rebooted also on my main OS. But when I tried that trick next time ethernet was missing in the live distro as well.
Also once I was able to revive ethernet but compiling sk98lin driver, blacklisting sky2 and rebooting. Of course next time doing the same routine did not help. The thing is - ethernet works fine with either sky2 or sk98lin and I can unplug the cable and plug it back in most of the time without any issues. But then every so often - bang and I'm stuck with only wireless until ethernet suddenly starts working again.
View 1 Replies
View Related
Feb 9, 2011
This is not the common problem that's on the stickied thread. I'm able to connect to my wireless network perfectly. I switch between Windows to game and Linux for desktop, coding, and hosting, so I can tell it has something to do with ubuntu 10.10. When I'm connected to my wireless network, at random times, my internet begins to slowdown, then I get disconnected from the internet, but the taskbar says I'm connected. This problem only happens in ubuntu and not Windows for some strange reason.
The applications that are usually open do not cause it, because it still does it even though I have little applications open (Google Chrome, gedit). When I'm on Teamspeak 3, I notice my ping rises to the 1000s randomly, and I get disconnected. Once again that only happens on Ubuntu.
View 6 Replies
View Related
Jul 26, 2010
my netbook shares it's wireless connection to my desktop. i've done this through the gui (edit connections > eth0 > ipv4 settings > shared to others) and it has worked for the last i don't know how many months.recently it had become a bit touchy with regards to how it was set up. it didn't work unless the netbook was already booted and wired in at the time of booting the desktop.now however it's gotten even worse and all i get when i connect them together is
"connection established" *pause* "disconnected" *pause* "connection established" *pause* "disconnected" *pause* "connection established" *pause* "disconnected" *pause* "connection established" *pause* "disconnected" *pause* "connection established" *pause* "disconnected" *pause* "connection established" *pause* "disconnected" *pause* "connection established" *pause* "disconnected" *pause* "connection established" *pause* "disconnected" and so on.
View 2 Replies
View Related
Apr 6, 2009
This computer is using a Linksys WMP54G network adapter, and running Linux Ubuntu 8.10 with all of the latest updates. It was working fine for a couple months, then one day the internet quit working on it. I've tried playing with all of the settings, and can't get it to connect to the network. The windows computers in the house work fine. I also hooked my Linksys WUSB54GS USB network adapter and that worked right away. When I put the WMP54G back in, it will detect the networks but it won't connect. It gives the message, "the network connection has been disconnected", right away. Can someone please help with this. I work doing tech support for a small ISP and am excellent troubleshooting Windows but Linux is another story.
View 3 Replies
View Related
Sep 16, 2009
I love Ubuntu but there is just one thing that I cannot get working. I have vista on this computer (Which I am going to delete after I get this working) when this computer is booted into vista then I type "192.168.1.65" (which is this computers internal ip address) and it connects to it without a problem. When I try this on ubuntu with KRFB running I type "192.168.1.65:5900" as it tells me to do with the added port number. This computer (This is the one I am Connecting to says "The remote user has been authenticated and is now connected." and when I hover over the icon it says "Desktop sharing - Connected with 192.168.1.70" which is my laptops IP address. On my laptop however it says "Remote Desktop Disconnected Because of a protocol error detected at the client (code 0x1104), this session will be disconnected. Please try connecting to the remote computer again." No matter how many times I try it doesn't work.
View 6 Replies
View Related
Dec 13, 2010
I have a number of Ubuntu machines running. Our NAS is FreeNAS. I am typing this on an Ubuntu 10.04 desktop that is successfully connects to an NFS share on the FreeNAS box every day. In addition, we have 3 10.04 server machines that also stay connected to the share successfully, Yesterday, I installed a new 10.04 server machine using IP 192.168.0.11. Everything works except connecting to the NFS share. It always returns with: mount.nfs: mount to NFS server '192.168.0.13:/mnt/amrd0s2/public-NFS' failed: timed out, giving up
Here's what I have checked: I can ping 192.168.0.13 (obviously) The NFS export mask is set to 192.168.0.0/16. The other machines are all on the same subnet as this problem machine (192.168.0.*) nfs-common, nfs-client, and portmap are all installed and running correctly. portmap is running correctly showmount -e 192.168.0.13 give the proper response:
Export list for 192.168.0.13: /mnt/amrd0s2/public-NFS/ 192.168.0.0 iptables isn't even installed (these machines are segregated in a private network behind a hardware fire all) There is nothing related to NFS is any of the syslogs. dmesg has one entry: [6.025966] FS-Cache: Netfs 'nfs' registered for caching which is insignificant. how to at least debug the nfs-client short of downloading the source and actually stepping through the code.
View 1 Replies
View Related
Jan 28, 2009
I'm using Xubuntu and i have set up my DSL connection manually. I get disconnected from the Internet within 2-3 minutes. I have to again select eth0 from the network icon in the taskbar. it connects well but gets disconnected again and again. I don't face such problem when i use Win XP.
Any idea what might have gone wrong ?
View 4 Replies
View Related
Jul 14, 2010
What is the best client application for connecting through PPPoE (DSL connection)? Gnome's default network manager isn't very useful. I created a DSL connection but don't know how to use that.
View 1 Replies
View Related
Mar 22, 2011
I was wondering if there was a way to connect over ssh "backwards". For example, lets say there's a client connected to example.com via ssh from behind a router. Well you wouldn't be able to ssh to that client unless the proper ports were forwarded on the router right? So I'm wondering if there would be a way to connect to example.com through ssh then from there connect to the client using the already existing ssh connection.
View 4 Replies
View Related
Jan 30, 2009
I have an ubuntu 7.10 ICS server that works fine and I have routed my traffic using firestarter to my windows PC. my server's IP is 192.168.0.1 and my windows client is 192.168.0.2. now, I have bought another PC and I want to assign 192.168.0.3 to it and connect it to ubuntu server. in windows, all I needed to do was to connect the first client to first network card, second one to second network card, bridge two connections in my server, assign 192.168.0.1 to the network bridge in my server and 192.168.0.2 and 192.168.0.3 to my clients, then share my internet connection. I also could access shared files in any computer from all of them. can I have the same functionality with a linux server?
I'll make a list to make it easy if you don't wanna read the whole post:
things I want:
1. assign one ip address to multiple interfaces in linux, making them bonded.
2. sharing the internet connection with both clients.
3. ability to use all shared files over a network.
View 4 Replies
View Related
Feb 1, 2010
I have been trying off and on for weeks to share my Internet connection with a Windows XP client (netbook). While I can ping back and forth between the two machines, in the form of a ping test, I can't get to the Internet from the client, no matter what I try.
My Ubuntu 9.10 desktop (host) has two NICs, eth0 and eth1. eth0 connects to the Internet. eth1 goes to the Windows XP client. Regardless of whether I use an Ethernet crossover cable or a standard cable, I can get the two machines to talk to each other, but no further.
Things I already tried:
-Tried setting eth1 to "shared" mode in NetworkManager on the host. I set the Win XP machine to automatically acquire an address & DNS. Didn't work.
-Manually configured the IP settings on both machines, like this:
client:
address 10.0.0.2
subnetmask 255.255.255.0
gateway 10.0.0.1
[Code]....
Despite all of the above, I still cannot share the host's Internet connection with the client. I don't understand where the client's traffic is going, and why I can't share the connection. As far as I know, I am not doing any sort of firewalling or blocking on the host, so there is no obvious reason that the client's traffic simply disappears. I just know that whenever I open a Web browser on the client, all I ever get is error messages.
I have had no issues setting up a shared connection when the host runs Windows XP, so I am pretty sure there is no broken hardware causing the problem. Why can't I share the connection under Ubuntu?
View 1 Replies
View Related
Jul 29, 2010
I have a Windows machine on which NX Client has been installed. I wanted to test if I could access my Ubuntu box. The Ubuntu Box has NX Server, Node and Client installed. When I try to log in from the Windows machine using NX Client with my Ubuntu username and password I get an error connection refused.
The following service is running: OpenBSD Secure Shell server sshd How can I resolve the issue?
View 3 Replies
View Related
Sep 9, 2010
So I setup VNC on my Mac (that runs Snow Leopard) and my PC (that runs Ubuntu) and I gave the IP address to Ubuntu, entered the password and it worked fine. The problem is that it still works fine... I only made this connection to test it because I thought it'd be cool, which it was (for a while). Now I cannot delete this connection whatsoever!
I have tried changing the password on the Mac, limiting the users, and even switching it off completely by unchecking its checkbox. I have also tried limiting the users... BUT UBUNTU STILL MANAGES TO GET INTO MY COMPUTER! This is really annoying because anyone using the PC downstairs can now go into my Mac and mess about with things - I hate this. Somehow, Ubuntu has locked in on my Mac and, despite the changes, can earn access no matter what!
View 5 Replies
View Related
May 29, 2011
I tried Ubuntu, Kubuntu and now Xubuntu, all 11.04. I've also tried Deluge, Transmission and Ktorrent. With 10.10 everything worked fine (all variants). Also, in Windows 7 it's working fine. But now it drives me crazy. As soon as I start a torrent, the download starts but after 30 seconds or so the download drops to a zero. Also, I'm not able to browse anymore. The networkmanager tells me I still have a connection.
Some say it has something to do with the number of peers the client connects to, or it's my router. My router isn't the problem, as it's working fine with 10.10 and windows. So maybe it's the number of peers right? Question. Why can I connect with over 200 peers at the same time while I'm using 10.10 or windows, but can't do it with 11.04? Better put, what should I do to get this working fine again? Going back to 10.10?
View 3 Replies
View Related
Jul 10, 2010
Our area was hit by a power surge and I cannot get the internet connection to work? What can I do. I'm using an AT&T modem which is connected to a netgear router.
View 4 Replies
View Related
Aug 24, 2010
I am facing connection refused error 111 in TCP client server program, in android native code which in C , but if code is in JAVA it works fine, but i want to continue in C only, in manifest file i have given permission and ip, port is correct .What am doing wrong?? or is their any network setting?? am using UBUNTU 10.04and If both client server Linux pc it works fine. only if android emulator becomes client then am getting connection refused
View 1 Replies
View Related
Sep 5, 2010
I have about 5 computers on my network that get their internet connection from a Linux NAT server.
192.168.12.02 is a Linux server that has a NAT set up to share the internet connection.
192.168.12.03 is a download server that is almost always downloading
192.168.12.05 - 192.168.12.20 is assigned by DHCP to users.
I want to make it so that the download server runs at full speed but is throttled only when someone from the user IP addresses range tries to use the NAT server.I think I'm looking for some way to set the download server's packets to have a lower priority than the client's packets. Is there a way to set this in the Linux server?
View 5 Replies
View Related
Jan 25, 2010
Over the last several days, I've been trying like hell to share my (wired) Internet connection with a netbook, running Windows XP, attached via crossover cable to my desktop's extra NIC (eth0). The eth0 link is established, but I can't get to the Internet from the Windows XP machine.I can ping one machine from the other, but any bits sent from the Win XP netbook mysteriously disappear when trying to reach any website.
There is no firewall running on the Ubuntu machine as far as I know. Windows Firewall is likewise disabled on the Windows XP machine. The Ubuntu machine connects to the Internet through another wired NIC, eth1.In Windows XP parlance, what I am trying to do would be called "bridging," where eth0 and eth1 would be the two parts of the bridge. In fact I already made it work, with both the netbook and my desktop running Windows XP. It took about 5 minutes.I can't believe what a huge pain this has been in Ubuntu. I'm pretty much ready to give up. There seems to be no way to get an Ubuntu system and a Windows XP system to share an Internet connection.
View 5 Replies
View Related
Dec 7, 2010
This is a recent problem, and I can't pinpoint any change/upgrade that would cause this. Rsync transfer from Client to Server:
sent 11756196 bytes received 1032741 bytes 138258.78 bytes/sec
total size is 144333466390 speedup is 11285.81
Pinging back and forth from each machine is fine. No Ifconfig errors Client, but Server has RX packet errors.
eth0
Link encap:Ethernet HWaddr 00:11:25:37:ee:44
inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::211:25ff:fe37:ee44/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:41786 errors:2157 dropped:0 overruns:0 frame:2157
TX packets:34138 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:55615449 (55.6 MB) TX bytes:4737538 (4.7 MB)
What's the next step?
View 3 Replies
View Related
Jul 5, 2011
How to enable wifi? I downloaded and installed Debian 6.00 and as I couldn't get online with my Tenda USB Wireless Adapter. I downloaded Debian 6.00 again, this time the CD Net Install version with Firmware included. However, the added firmware version of Debian does not find my wireless either. My wireless adopter is shown as Bus 001 Device 003: ID 148f:3072 Ralink Technology, Corp. RT3072 Wireless Adapter. There is a Network Icon in the Panel which when clicked shows "Create New Wireless Network". I have put in my ISP related network and my password and rebooted, but all I get is the message on my desktop:
"The Network Connection has been disconnected."
That isn't very polite, is it? Who has disconnected it and why remains a mystery to everyone except the culprit(s). I think I must have missed a basic step in the Wifi Enabling process. I checked the Use Permissions and everything is fine there, as User I have permissions to use modems and do networking and so forth. Also I should like to try "modprobe" but I see the package isn't in Synaptic Package Manager.
View 7 Replies
View Related
Jul 13, 2009
I have a webserver setup, where i need the server to have multiple eht:0 aliases in order to do some SSL-vhosting and other stuff.
The servers eh0 is set up in /etc/network/interfaces (its an Ubuntu)
And i have added the eth aliases with : ifconfig eth0:1 123.231.213.123 up command.
This works great, i can use the additional IP�s for the SSL-vhosts, and all is good.
My problem now is that while the server itself has 1 IP, (and approx 20 IP on alias interfaces) it uses random (i think) IPs when it is to connect to other servers. E.g the main problem is that if a Vhost on the server sends out an email, the server uses a wrong IP in the headers. Thus making it seem like the email is coming from another IP than then on the Vhost it�s currently residing.
Currently, when the server connects to its smarthost in order to deliver emails, It connects from the IP that is bound to the eth0:0 interface, and not the IP bound to eth0 which is desired.
The question now is how do I sort out the IP�s so that all connections the server makes as a client, will use the first (Eth0) IP ?
And all the extra IP-adresses will only be used as "server addresses" not to make client requests.
View 2 Replies
View Related
Jun 23, 2010
My network is barely functional. I'm running 2 linux servers connected by openvpn (tun) through routers on both sides. There are Windows clients (98 and XP) on both subnets. One server (ls3) acting as PDC for the domain. The Windows clients use the respective linux boxes as gateways. On the server side (ls3 which is both openvpn server and samba server), all the clients can read/write properly to shares on both sides. The problems are all on the client side. Share connections to the server side disconnect after a few moments.
Browsing on the client side windows machines is fine. I can see shares on the server side. Some server side files open and are readable, writable, other server side files will not open. Some samba logon scripts on the server side can be opened from the client side. Others open after a long wait to a blank file! Permissions on server side files are set to 777 for testing. If a file won't open or reads "blank", that doesn't change no matter how many times you try. A non-readable/writable file overwritten by a readable/writable one can be read and written to!
I can ping successfully from any client on either side to any other client by either ip address or workstation name. Firewalls on both side are set to forward tcp and udp traffic going to port 1194 to the respective gateway linux boxes. Iptables on both linux gateways are down for testing. I tried reversing the openvpn server/client roles with the same result; the same physical side of the network had the problem. On one of the windows 98 clients, I wiped out the networking configuration completely and rebuilt it from scratch. Same result.
One one of the windows xp clients, I tried to rejoin the domain. It went through successfully but the result was the same as above. The network was operating smoothly for several years until the client side dsl modem broke last week. It was replaced with a newer model and at the same time I migrated from a pptp connection to openvpn. How to resolve this, Is this something to do with openvpn? Is this a network hardware problem? Am I missing something in the port forwarding on the routers? My smb.conf files are ancient except I added interface tun0. I have never seen 2 files sitting next to each other in the same directory where one opens and the other doesn't!
I'm running Mandrake 9.2 on the client side and Mandriva 2008 on the server side. I have a Sonicwall firewall on the server side, a Westell 7500 on the client side. I note that during the modem install, the http port was opened to the linux box on the client side and the access log got huge over the weekend and I ran out of disk space until I closed it down and deleted the log. I tried a simple test while viewing /var/log/daemons/errors on the client side. From a windows workstation in the client subnet, I opened a dos window and tried to print a file located on the samba server on the openvpn server machine which I knew NOT to be problematic.
The file printed and there were no errors reported in the log. I repeated the test with a known problematic file. The file would not print. The errors log noted:
Authenticate/Decrypt packet error: packet HMAC authentication failed
I regenerated the static.key file on the server side and scp'd it to the client side and restarted both openvpn's. I checked for duplicate files named static.key on both sides. Same error.
View 1 Replies
View Related
Mar 9, 2011
I am writing a TCP server in C, and the server listens to incoming client connections and accepts them. It then creates a thread to handle the client. The clients are expected to only receive data from my server and not send any data. So if I use a select() call with a recv(), I believe that the recv() will just block forever since there will not be any data coming from the client. If I use a non-blocking recv(), then this will just return a 0 which tells me nothing because the client is not expected to send any data. I am not sure if I have misunderstood some socket concepts, but I need a solution to detect when the client has disconnected so that I can close the socket and stop sending data to the client. As I understand it, simple ACKs etc are not captured by the recv(), and only data sent by the client will cause recv() to return a non-zero value, so I am not sure how to know when the client has disconnected.
View 7 Replies
View Related
May 16, 2011
The wireless connection gets disconnected and when I try to reconnect it, it is not possible, the wireless icon keeps blinking and last for ever and never gets connected again, the only solution is to restart the computer. do I need to do a specific task to stop this error? operating system ubuntu 10.10, I have a hp pavilion dv600, i recently had some issues with the wireless driver, now I have it and it works fine but now the problem is that the wireless connection gets diconnected and when trying to reconect it, well it is not possible. please advise.
View 1 Replies
View Related
Nov 5, 2010
I logged on to one of my servers and ran a yum update, while the update was in progress my SSH connection got disconnected.
I logged in through a new connection when connectivity was restored and looked at running processes. It looked like yum was hung so I killed it (big mistake and one I won't repeat).
Now, when I try and run yum, I get the following:
Quote:
yum update: There was a problem importing one of the Python modules required to run yum. The error leading to this problem was:
Please install a package which provides this module, or verify that the module is installed correctly.
It's possible that the above module doesn't match the current version of Python, which is:
If you cannot solve this problem yourself, please go to the yum faq at:[url]
I have tried hunting around for the correct version of libelf without much luck.
Is there anything I can do to get yum working again?
The server is running Centos 5.2
View 2 Replies
View Related