Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

For some reason I need to configure my computer using static IP settings to let other computers to find it. Here's my settings in /etc/network/interfaces:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto wan0

iface wan0 inet static
       address 192.168.2.100
       netmask 255.255.255.0
       gateway 192.168.2.1
       nameserver 140.112.254.4 8.8.8.8
       dns-domain SSG5-Serial
       dns-search SSG5-Serial

And then I tried to connect to the Internet using Firefox but it can never connect to the web server correctly. So I tried to ping www.facebook.com and I get:

ping: unknown host www.facebook.com

This might be a problem with the DNS server, so I used another computer to nslookup www.facebook.com and get the IP 31.13.68.8. Therefore I tried to ping 31.13.68.8 and it can ping this IP correctly.

So I try to connect to Facebook with Firefox directly using the address 31.13.68.8. Strangely, it will automatically change the address to www.facebook.com but still can't show the page. Does that mean the DNS server works?

The last step I tried is to ssh 192.168.2.100 to this computer and it works. I can log in to the computer and control it. I guess that means the IP setting is correct?

I can't figure out what the problem is and how to solve it. Thanks for any advice!

share|improve this question
    
It looks like you have a Juniper Networks Secure Services Gateway, try using the IP instead of the name, and try. –  Mitch Jul 23 '13 at 8:28
    
Do you mean the dns-domain and dns-search part? –  AlbertK Jul 23 '13 at 9:02
    
Yes. Try changing these to IP instead. –  Mitch Jul 23 '13 at 9:21
    
OK...but how can I get the IP? I'm a beginner to Ubuntu networking, sorry for that. –  AlbertK Jul 23 '13 at 9:37
    
Try host SSG5-Serial see if it gives you an IP address. –  Mitch Jul 23 '13 at 9:45

1 Answer 1

First of all, it is dns-nameservers not nameserver. Second, since this is a wireless interface, you'll need to declare the SSID you want to connect to and supply the password. I suggest this:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto wlan0

iface wlan0 inet static
   address 192.168.2.100
   netmask 255.255.255.0
   gateway 192.168.2.1
   dns-nameservers 140.112.254.4 8.8.8.8
   dns-domain SSG5-Serial
   dns-search SSG5-Serial
   wpa-ssid your_router
   wpa-psk your_key

Finally, isn't it wlan0 and not wan0?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.