LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Cannot connect to internet (Wireless nor Wired) after Hard Reset (https://www.linuxquestions.org/questions/linux-newbie-8/cannot-connect-to-internet-wireless-nor-wired-after-hard-reset-776995/)

minrich 01-22-2010 10:25 PM

Right, you will have to tell me a few things:

a) what is the make and model number of your router, known as knuteson?

b) when you were connected to your xbox please describe the connections and settings that you had between xbox-ubuntuPC, and ubuntuPC-router and whether they were wired or wireless in each case,

c) have you tried resetting your router with either a soft boot (turn off/disconnect power) for a few seconds, or a hard boot (which restores factory settings and which requires that you know and/or remember your ISP username+password and the settings that were working,

d) have you and/or can you connect by wire to your router, if so does it work and /or connect you to the internet?

NB you don't have to be root or use sudo to run the ping command

minrich 01-22-2010 10:29 PM

@leopard - either that or it is MAC address blocking, I haven't found out what exactly we are dealing with here.

boaty 01-23-2010 12:39 PM

1. Make and Model #: Westell VersaLink 327W.
NB: I also can't connect at my own house. Knuteson router is my cousins'. However, we do happen to have the same router make and model.

2. My setup consisted of my XBox wired via ethernet cable to my laptop, then my laptop wirelessly connecting to the internet. I used this script to setup my ubuntu settings to allow forwarding. I grabbed the commands off of a tutorial. The script should show how I'm assigning IPs and so forth. I can't exactly remember what the values were in my XBox settings, but they would be similar to what's shown below.
Code:

ifconfig eth0 up
ifconfig eth0 192.168.2.1
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o wlan0 -s 192.168.2.0/24 -j MASQUERADE
iptables -t nat -A PREROUTING -i wlan0 -p tcp --dport 3074 -j DNAT --to-destination 192.168.2.2
iptables -t nat -A PREROUTING -i wlan0 -p udp -m multiport --dports 88,3074 -j DNAT --to-destination 192.168.2.2
iptables -A FORWARD -i wlan0 -d 192.168.2.2 -p tcp --dport 3074 -j ACCEPT
iptables -A FORWARD -i wlan0 -d 192.168.2.2 -p udp -m multiport --dports 88,3074 -j ACCEPT

3. I have tried neither of those reset methods.

4. I'm assuming I could connect to the router through a wired method, but the last time I tried getting to the internet that way, it didn't work.

Edit:
So, I've added the script which contains all the settings I had to change in order to allow my Xbox to connect through my laptop.

Here is the primary tutorial I used to set myself up
http://www.linuxquestions.org/linux/...a_wireless_LAN

And this is a thread I made on Ubuntu forums. I was still having trouble after going through the tutorial. As you will see if you happen to read it, some IP was incorrect in my /etc/resolv.conf file. After changing it, it worked like a charm.
http://ubuntuforums.org/showthread.p...ring+Laptop+as

The UbuntuForums thread also shows what my XBox network settings were.

minrich 01-23-2010 07:56 PM

First you could try running the following command:

# iwconfig wlan0 ap 00:12:0E:85:F8:F8 commit

Since this sets what appears as Not-Associated in your iwconfig wlan0

Then run # iwconfig wlan0 --- to see if it is set,

If the foregoing doesn't work, and doesn't get you connected, then I will need to see the current content of:

# cat /etc/resolv.conf

and

# route -n

lupusarcanus 01-23-2010 08:14 PM

@minrich - He has 100% packet loss. If there was a MAC filter, wouldn't he receive a deauthentication packet, at least?

minrich 01-23-2010 08:28 PM

@leopard - in post #10 his output of ifconfig -a showed a positive RX and TX bytes for wlan0, so the wireless is working - I do agree that the ping result in post #14 does show 100% package loss, so my immediate thought is that the router's IP address isn't 192.168.1.1, notwithstanding the fact that ifconfig -a shows an allocation by router dhcp of 192.168.1.40 for wlan0 Though I have never come across the'ping: sendmsg: Operation not permitted' message before, I guess I shall have to do some googling to improve my knowledge

GrapefruiTgirl 01-23-2010 09:18 PM

Admittedly I have not read the entirety of every post in this thread, but wanted to say that "ping: sendmsg: Operation not permitted" tends to appear when there is a firewall in place that's blocking ICMP traffic. Sure there are probably other reasons this might happen too, but, these are the circumstances when I am familiar with seeing this message on my machine.

Hope this helps a little bit :)
Sasha

boaty 01-23-2010 11:49 PM

zach@ubuntu:~$ sudo su
[sudo] password for zach:
root@ubuntu:/home/zach# iwconfig wlan0 ap 00:12:0E:85:F8:F8 commit
Error for wireless request "Commit changes" (8B00) :
SET failed on device wlan0 ; Operation not supported.
root@ubuntu:/home/zach# iwconfig wlan0 ---
iwconfig: unknown command "---"
root@ubuntu:/home/zach# iwconfig wlan0
wlan0 IEEE 802.11bg ESSID:"knuteson"
Mode:Managed Frequency:2.437 GHz Access Point: 00:12:0E:85:F8:F8
Bit Rate=1 Mb/s Tx-Power=20 dBm
Retry min limit:7 RTS thr:off Fragment thr=2352 B
Encryption key:off
Power Management:off
Link Quality=9/100 Signal level:-172 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

root@ubuntu:/home/zach# cat /etc/resolv.conf
# Generated by NetworkManager
domain myhome.westell.com
search myhome.westell.com
nameserver 192.168.1.1
root@ubuntu:/home/zach# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 2 0 0 wlan0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wlan0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
root@ubuntu:/home/zach#
[/code]

minrich 01-24-2010 12:06 PM

Right, we are getting closer since you are now associated (incidentally, you can drop the 'commit' command on the end of the "# iwconfig wlan0 ap 00:12:0E:85:F8:F8" command, since your card doesn't appear to like it - read the 'man iwconfig' page to learn what it does).

Following GrapefruiTgirl's post and my googling, I would suggest that you edit your iptables file --- put '#' in front of each and every line and save the file (this is known in the trade as 'commenting out' the 'script' contained in a file, and it has the added advantage that you can remove the #'s later if you want to connect your xbox again. Once you have done this you should be able to 'ping 192.168.1.1' --- you don't need to be root to ping, also you should be able to connect to http://192.168.1.1 in your browser --- it should come up with a log-in page for your cousin's router. No need to proceed further, if your wifi connection is working, you should now have internet access, so try http://www.google.com and proceed immediately to http://linuxquestions.org and report back here immediately.

Once you are back connected to the net, we can work on making you connection permanent each time you boot into ubuntu.

GrapefruiTgirl 01-24-2010 12:45 PM

regarding the above post..

After having commented out the lines in the iptables firewall script, you will want to either RESTART the iptables firewall service, or do the following:

shell# cat iptables | iptables-restore -c

so that the new rules (which are actually NO rules) will be in play. Note, I assume your iptables script is called "iptables", but if it has a different name, replace the filename "iptables" in my above command.

boaty 01-26-2010 08:27 PM

Thanks guys, I'm going to try this right away!

Sorry for the late responding. I don't have internet at my house period, so I've been forced to rely on my cousins', my grandma's, my dad's. Phew. So, I'm going to boot Ubuntu and report back in a few!

Edit:

Well...I failed to realize this in my earlier excitement, but where on earth is Carmen Sandiego. Err, I mean iptables? I'm currently googling this, but if anyone knows the sweet and short answer, I'd be much obliged.

Thanks in advance :D

Edit 2: Well I'm dead tired. I found this thread somewhere that said there isn't really a default iptables config file, but then I'm not really sure what you're asking me to open and edit. Here's that thread I was talking about: http://www.linuxquestions.org/questi...g-file-584024/

Anyways, I'm off to sleep. G'night and thanks again.

boaty 01-31-2010 11:42 AM

Bump

minrich 01-31-2010 01:40 PM

Since you, apparently - according to your post #18, used a script to set up your iptables settings for your xbox -> eth0 and wlan0 -> router I would suggest that you ensure that this script is not running. While I am only guessing, the script in question is probably in your /etc/init.d/ directory - but I may be wrong and you will have to rely on your memory, as in those tiny grey cells between your ears, and remove it to somewhere you can find it again; so that it is available if and when you want to reconnect your xbox. You will then have to reboot your laptop, so that we can be sure that these iptables (firewall) are not blocking your wireless connection to your 'knuteson' router.

You should then be able to: ping 192.168.1.1

You may have to run the commands suggested in my post #19 (dropping the 'commit' command that your box doesn't seem to like and/or need.

boaty 02-04-2010 07:13 PM

My script is actually in a folder I created (called "Scripts") in my home directory. I created a link to it in my toolbar, so it should not be running on boot.

minrich 02-04-2010 07:49 PM

From the output of lsmod in your post #3 you have a number of iptables modules loading and whilst I don't know nuffink about iptables other than that which I have read in 'man iptables' I suspect that ipt_LOG might have something to do with the creation of a log file in /var/log/ perhaps you can look here and see when it was last created and/or modified which should indicate if iptables are running each time you boot. If so you will have to find a way of stopping it from blocking your internet access.


All times are GMT -5. The time now is 10:51 PM.