Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

How To Use Debian Server With Static IP Address?

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
Debian Lynx
Posts: 1
Joined: 2023-03-05 05:03

How To Use Debian Server With Static IP Address?

#1 Post by Debian Lynx »

Hello all,

I am trying to setup my Debian 11 machine as a web and email server using a static IP address that was given to me by our ISP. However, I am having difficulty after inputting the static IP setting provided by the ISPs. It seems I am missing a step because the connection simply isn't being made between my machine and the ISP.

I understand that the device provided by the ISP needs to be programmed (modem?), and I have attempted to do this from the command line of my Debian machine:

Code: Select all

$ nmcli con mod 'wlp59s0' ipv4.address 74.110.182.196
Note that I am doing this through the wireless connection and not the wired. My desktop displays that I am still connected to the network after using this command to set my IP address, netmask, and gateway, but now I cannot connect to the internet using any web browser. The pages simply never load. I am somewhat at a loss here as this is relatively new to me.

These are two tutorials I have attempted to follow:
I have also tried manually editing my /etc/network/interfaces file:

Code: Select all

auto wlp59s0
iface wlp59s0 inet static
        address 74.110.182.196
        netmask 255.255.255.0
        gateway 74.110.182.1
        dns-nameservers ns77.domaincontrol.com ns78.domaincontrol.com
Again, I am trying to program the static IP to my machine so I can use it as an email and web server.

It seems as though my settings are correct but the connection is not being made. Do I need to switch some setting on the physical modem installed by the ISP? How can I remedy this situation and use my static IP.

Any help is appreciated.

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5347
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 13 times
Been thanked: 66 times

Re: How To Use Debian Server With Static IP Address?

#2 Post by dilberts_left_nut »

Put everything back the way it was before you started.
Type:

Code: Select all

curl icanhazip.com
Have a beer. :D
AdrianTM wrote:There's no hacker in my grandma...

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1418
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 80 times
Been thanked: 191 times

Re: How To Use Debian Server With Static IP Address?

#3 Post by steve_v »

Debian Lynx wrote: 2023-03-10 09:43device provided by the ISP
Is this a straight "modem" - i.e. one WAN port, one LAN port, WAN IP passed through to a single machine (also known as "bridge" mode), or a router with one WAN and multiple LAN connections (wired, wireless etc)?
What you're doing will only work with the former, but the latter is far more common for ISP provided "modems" (along with the irritatingly misleading terminology ISPs use for these devices).

If what you have is a router, it will almost certainly be doing one-to-many NAT and providing private IP addresses to LAN devices with DHCP. The static (public) IP address your ISP provides applies only to the WAN side of the router, you'll want to investigate it's configuration and set up some port-forwarding rules to redirect traffic your servers LAN IP.

If you really do have a bridge-mode "modem", we'd need to know how it expects the LAN side to be configured (PPPoE, DHCP, VLAN etc). to suggest set up of the debian machine.

As dilbert suggests, step one is likely putting everything back to default (DHCP), then checking your public IP with one of the many "what is my Ip" services on the 'net. Compare with the IP your server gets from the "modem" (i.e. run 'ip address' or 'ifconfig wlp59s0'). If the latter is different and in a private address range, your "modem" is a router and you are behind it's NAT.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

Post Reply