ifup, IP masquerading -- loss of wireless signal

Hello.

I’m trying to follow these instructions to share an internet connection between two computers:
openSUSE ICS: Internet Connection Sharing (Linux IP Masquerading) with Suse or Windows Servers

My problem is that when I go to Yast > Network Settings and select Traditional Method with ifup, I can set up eth0 easily enough, and when I set up the wlan0 (basically only adding the wireless network I want to connect to and the password), I can no longer connect to the internet afterwards. However, I can ping google, for instance (and also still remain connected to the other computer through eth0).

I’m not sure what I might be overlooking.

Hi,

As I understand you this means you can’t launch Webpages or send/receive emails. So it sounds like an DNS-Problem. Type


dig www.google.com

on a console and post the result here.

Bye

Erik

Thanks for the reply.
Here’s what I get

$ dig www.google.com

; <<>> DiG 9.5.0-P2 <<>> www.google.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2683
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 7, ADDITIONAL: 7

;; QUESTION SECTION:
;www.google.com.			IN	A

;; ANSWER SECTION:
www.google.com.		29	IN	CNAME	www.l.google.com.
www.l.google.com.	23	IN	A	74.125.95.103
www.l.google.com.	23	IN	A	74.125.95.104
www.l.google.com.	23	IN	A	74.125.95.147
www.l.google.com.	23	IN	A	74.125.95.99

;; AUTHORITY SECTION:
l.google.com.		27	IN	NS	c.l.google.com.
l.google.com.		27	IN	NS	d.l.google.com.
l.google.com.		27	IN	NS	e.l.google.com.
l.google.com.		27	IN	NS	f.l.google.com.
l.google.com.		27	IN	NS	g.l.google.com.
l.google.com.		27	IN	NS	a.l.google.com.
l.google.com.		27	IN	NS	b.l.google.com.

;; ADDITIONAL SECTION:
a.l.google.com.		27	IN	A	209.85.139.9
b.l.google.com.		27	IN	A	74.125.45.9
c.l.google.com.		27	IN	A	64.233.161.9
d.l.google.com.		27	IN	A	66.249.93.9
e.l.google.com.		27	IN	A	209.85.137.9
f.l.google.com.		27	IN	A	72.14.235.9
g.l.google.com.		27	IN	A	74.125.95.9

Thanks for identifying what the problem most likely is, Erik.
With this info, I see this has been addressed here:
Configuring Wireless To Run With Ifup - openSUSE Forums

and this other guide from swerdna looks quite useful to:
HowTo Configure a network card in Suse/openSUSE 10, 11 for LAN and Internet Access.

I’ll report back if I run into any trouble after reading through those.

No joy.

From this guide:
HowTo Configure a network card in Suse/openSUSE 10, 11 for LAN and Internet Access.
I tried both “default DHCP configuration” and “DHCP configuration on steroids”-- the later involves setting static Name Servers and hostname. This seems to be the only potentially tricky part.

I looked up my name servers from:
DNS Stuff: DNS tools, DNS hosting tests, WHOIS, traceroute, ping, and other network and domain name tools.

In both cases I fail to launch webpages, though I can still ssh into remote machines (and local) and ping google.

Is there anything suggestive in the “dig” output I posted earlier??

Hi,

Strange problem. :wink: Ok, just to resume what I understood:

You have the following network structure:

internet - lan - eth0 - wlan0 - other lan

(or eth0 directly connected to the internet)

In case you don’t launch the wlan0 everything works fine. You can launch web paged in any browser. In case you launch the wlan0 you can ping and ssh but you cannot launch web pages. So let’s try to analyze from the bottom:

First try if there is any connection to google after launching the wlan0. Type in the console:

<code>
telnet www.google.com 80
</code>

The result should be something like this:

<code>
Trying 209.85.129.99…
Connected to www.google.com.
Escape character is ‘^]’.
</code>

If it is like this (maybe another IP) we know that you can connect to the server port 80. If not I would search in the firewall settings.

To leave the telnet prompt type
<code>
exit
</code>

If it works try to open the web page with lynx. I hope it is installed. If not do so and type:

<code>
lynx www.google.com
</code>

You should see the web page in textual mode. Ugly but we know that your computer also receives the info of google. If it is like this … Very strange. If not also. :wink: I really hope the first test will fail. :wink:

Bye

Erik

Here’s my setup:

internet <–> wlan0 on laptop and eth0 <–LAN–> eth0 on desktop

Now things are getting bizarre. I was in the middle of typing this message that I’m not sure what had changed (except rebooting), but the previous configurations now work. However, after 20 minutes under the ifup configs, I lost the signal and could not reconnect. I also could not ping any website or ssh remotely. If I go back through YAST to network devices and have it setup automatically, it reconnects me to the internet immediately. I went back and forth a few times just to make sure it wasn’t a glitch, and made sure that all the fields were still present in the ifup setup.

When it cut me off, I was trying to have the desktop connect to the internet as well. I’m not sure if that could have any affect on my laptops connection. This is what I was doing:

This is a headless machine with no gui. I ssh into it and use netconfig to set up network info. I set hostname and domain for this machine: “local”, “local” respectively (can I put anything here? or is the domain name the domain that laptop connects to?)

setup static IP: 192.168.1.200
netmask: 255.255.255.0
gateway address: 192.168.1.100 (this is the same gateway as on laptop for wlan0)

And then… will I be accessing a nameserver??
I set the nameservre IPs in the laptop, do I include them on this machine too, or? I tried doing this both ways while there was still a connection, and I couldn’t connect to the internet from desktop (cannot ping or ssh remotely).

I have a suspicion that what have initially changed to allow me internet access was simply rebooting my laptop today. I had been fiddling with settings, but I don’t think I wrote anything to init.d or rc.d. That said, I changed no settings on the laptop since these connections worked. I did notice here(DNS Stuff: DNS tools, DNS hosting tests, WHOIS, traceroute, ping, and other network and domain name tools.) that the DNS server it comes up with seems to change between about 4 or 5 addresses. I have three listed in my ifup settings. Could this matter? I also attempted to have them change via DHCP, but this did not reconnect me either.

Thank you for helping me wade through the mystery.
I didn’t post the outputs you asked, because at present I just get “unknown host” messages and the like.

lol strange prob and strange solution

You’re welcome :slight_smile:

lol strange prob and strange solution

But I don’t have a solution!
I wrote:

However, after 20 minutes under the ifup configs, I lost the signal and could not reconnect.

Every time I go through the same procedures now, I cannot connect, nor ping, nor ssh remote machines. I can’t imagine what has changed so dramatically.

wlan0     Link encap:Ethernet  HWaddr 00:1F:3C:45:A1:FD  
          inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::21f:3cff:fe45:a1fd/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6653 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7102 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4822285 (4.5 Mb)  TX bytes:1564121 (1.4 Mb)

the inet addr is what I set to be the default gateway… is that how it should come up?
Any other ideas?

Hi,

sorry for answering late. I had a lot of work.

I’m just curious. Why do you do that. I expected it the other way around.

Internet means that this is a router? Or just a modem with WLAN Access Point?

Ok, so your installation works. Now I think it is not a software problem. Can you reproduce the error by rebooting and reconnecting? What do the logs tell you? If you can reconnect and lose connection again type:


dmesg | tail -20

I hope 20 lines will be enuough.

Setup automatically means you switch to network manager or means that you delete the device let yast find it again and set it up? Does the connection break down after a while again?

Normally not.

Yes.

Which leads to a problem with the router/modem. You cabled the desktop to the same router/modem?

You need one. More than one is just for redundancy if the first DNS server is down. I have a local DNS server and all local machines ask that one. That works fine as long that computer is up and connected to the internet. If it is down I have other probs than the internet connection. :wink:

Your welcome. Sorry that I misunderstood the post.

Bye

Erik

Quote:

[QUOTE]Originally Posted by roidemai View Post
Here’s my setup:

internet <–> wlan0 on laptop and eth0 <–LAN–> eth0 on desktop

I’m just curious. Why do you do that. I expected it the other way around.[/QUOTE]

I do it this way because my desktop is physically far away from the router and I don’t want to run huge amounts of cables.

Ok, so your installation works. Now I think it is not a software problem. Can you reproduce the error by rebooting and reconnecting? What do the logs tell you? If you can reconnect and lose connection again type:

I’ve only ever been able to successfully connect that one time–so I’m not sure the installation actually works. All my further attempts leave me unable to resolve a webpage, ping any IP or ssh remotely. Here’s the dmesg:

dmesg | tail -20
Registered led device: iwl-phy0:radio
Registered led device: iwl-phy0:assoc
Registered led device: iwl-phy0:RX
Registered led device: iwl-phy0:TX
wlan0: authenticate with AP 00:1a:70:f7:3a:07
wlan0: authenticate with AP 00:1a:70:f7:3a:07
wlan0: authenticated
wlan0: associate with AP 00:1a:70:f7:3a:07
wlan0: RX AssocResp from 00:1a:70:f7:3a:07 (capab=0x411 status=0 aid=1)
wlan0: associated
0000:00:19.0: eth0: Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX
0000:00:19.0: eth0: 10/100 speed: disabling TSO
SFW2-INext-DROP-DEFLT IN=wlan0 OUT= MAC= SRC=192.168.1.100 DST=224.0.0.251 LEN=366 TOS=0x00 PREC=0x00 TTL=255 ID=0 DF PROTO=UDP SPT=5353 DPT=5353 LEN=346 
SFW2-INext-DROP-DEFLT IN=wlan0 OUT= MAC= SRC=192.168.1.100 DST=224.0.0.251 LEN=254 TOS=0x00 PREC=0x00 TTL=255 ID=0 DF PROTO=UDP SPT=5353 DPT=5353 LEN=234 
SFW2-INext-DROP-DEFLT IN=wlan0 OUT= MAC= SRC=192.168.1.100 DST=224.0.0.251 LEN=366 TOS=0x00 PREC=0x00 TTL=255 ID=0 DF PROTO=UDP SPT=5353 DPT=5353 LEN=346 
SFW2-INext-DROP-DEFLT IN=wlan0 OUT= MAC= SRC=192.168.1.100 DST=224.0.0.251 LEN=366 TOS=0x00 PREC=0x00 TTL=255 ID=0 DF PROTO=UDP SPT=5353 DPT=5353 LEN=346 
SFW2-INext-DROP-DEFLT IN=wlan0 OUT= MAC= SRC=192.168.1.100 DST=224.0.0.251 LEN=336 TOS=0x00 PREC=0x00 TTL=255 ID=0 DF PROTO=UDP SPT=5353 DPT=5353 LEN=316 
SFW2-INext-DROP-DEFLT IN=wlan0 OUT= MAC= SRC=192.168.1.100 DST=224.0.0.251 LEN=336 TOS=0x00 PREC=0x00 TTL=255 ID=0 DF PROTO=UDP SPT=5353 DPT=5353 LEN=316 
SFW2-INext-DROP-DEFLT IN=wlan0 OUT= MAC= SRC=192.168.1.100 DST=224.0.0.251 LEN=378 TOS=0x00 PREC=0x00 TTL=255 ID=0 DF PROTO=UDP SPT=5353 DPT=5353 LEN=358 
SFW2-INext-DROP-DEFLT IN=wlan0 OUT= MAC= SRC=192.168.1.100 DST=224.0.0.251 LEN=336 TOS=0x00 PREC=0x00 TTL=255 ID=0 DF PROTO=UDP SPT=5353 DPT=5353 LEN=316 

Setup automatically means you switch to network manager or means that you delete the device let yast find it again and set it up? Does the connection break down after a while again?

I meant I switch to network manager and take no further action. My connection comes back online and has never broken down with network manager.

[QUOTE] Originally Posted by roidemai View Post
I tried doing this both ways while there was still a connection, and I couldn’t connect to the internet from desktop (cannot ping or ssh remotely).

Which leads to a problem with the router/modem. You cabled the desktop to the same router/modem?[/QUOTE]
No. I never cabled the desktop to the router, only to the laptop. I’ve never been able to connect to the internet from the desktop. The “both ways” I spoke of was whether I write the nameservers to the desktop or not, but I don’t think I ever completed setting up IP masquerading before I lost the connection on the laptop. All this is under the assumption that I can only setup IP masquerading under ifup and not under network manager. I have no reason to believe there is any problem with the router itself. I never have any connection problems while using network manager.