Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a Cisco DPC3825 DOCSIS 3.0 Gateway router. I'm trying to set up a static IP in order to forward port 22 for SSH. I did this by setting etc/network/interfaces to this

auto eth0 
iface eth0 inet static 
address 192.168.1.178 
netmask 255.255.255.0 
gateway 192.168.1.1 
dns-nameservers 8.8.8.8 192.168.1.1

However, my router's IP is 192.168.0.1, and so it wont let me forward to any IPs outside the range 192.168.0.xxx. So I changed the above to

auto eth0
iface eth0 inet static
address 192.168.0.178
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameservers 8.8.8.8 192.168.0.1

However, this has the strange effect that I can no longer log into my router from behind. It just says 'unable to connect, firefox can't establish a connection to the server at 192.168.0.1'.

share|improve this question
    
In the first instance your gateway is 192.168.1.1 In the second instance it's 192.168.0.1 Did it change or do you have the wrong router/gateway address? You should double-check your router address to make sure it's not -really- 192.168.1.1 –  BobT May 1 '13 at 23:22
    
@BobT I'm fairly sure that the address is 192.168.0.1, because that's the address I use to log into it from behind. Also, in the LAN setup menu it says the local IP address is 192.168.0.1. In any case, I have internet connectivity under both configurations. –  Matt Munson May 1 '13 at 23:29
    
just to confirm, you have rebooted or brought the interface down and back up between configuration changes? does ifconfig agree with your conf file? –  Frank Thomas May 2 '13 at 5:55
    
@Frank yes on all counts. –  Matt Munson May 5 '13 at 19:30

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.