Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Still a newbie at configuring Linux. I have a new machine, installed Fedora Server 25, all ok. Trying to setup the static IP. I believe I have to setup the DNS routes, but not sure how. Can someone tell me if I am on the right track, and if so, how to setup the routes? The router shows the static IP correctly, and I can ping only those devices that are on the subnet.
NOTE: There is no GUI. I have to do this through the character interface.
Here is the content of /etc/sysconfig/network:
# Created by anaconda
NETWORKING=yes
HOSTNAME=jonas
NTPSERVERARGS=iburst
Here is the content of /etc/sysconfig/network-scripts/ifcfg-enp4s0
HWADDR=00:E0:4C:68:00:4B
TYPE=Ethernet
NM_CONTROLLED="yes"
BOOTPROTO=static
IPADDR=192.168.1.252
NETMASK=255.255.255.0
BROADCAST=192.168.1.255
NETWORK=192.168.1.0
GATEWAY=192.168.1.1
DEFROUTE=yes
PEERDNS=no
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp4s0
UUID=2be202a9-47e3-3f1b-9479-058fd1519a21
ONBOOT=yes
AUTOCONNECT_PRIORITY=-999
Ok, thanks, but I use port forwarding to get to a database on the server from locations outside of the local network. So, I have a static IP, but in establishing that, lost connectivity to the internet. Can you help me get that restored with the static IP?
Ok, thanks, but I use port forwarding to get to a database on the server from locations outside of the local network. So, I have a static IP, but in establishing that, lost connectivity to the internet. Can you help me get that restored with the static IP?
You obviously have a firewall running which mainly blocks incoming connections unless you specifically allow them.
I don't even know what kind of firewall you have, so I have to speak in generalities. If you want ssh and its friends to connect so you can connect to your computer from elsewhere, you'll want to punch a hole at port 22, 614, 830, 3897 and 1735, I'm not sure how important those higher numbers are, you might want to just start with 22. If you're running a webserver you want the world to have access to, you need to open port 80 (http) and 443 (https). You don't necessarily have to open a port to the whole world, you can open it to certain IP addresses.
If you want to see what ports different services use, look at /etc/services. They should all be there.
Sorry, I wasn't clear enough. I was basically explaining why I need to establish the static IP. I know how to punch a hole in the firewall using firewalld. After adding the static IP, the server can only ping internal network nodes, not anything on the Internet. Knowing this, I expect that I have to fix this problem before going on to the firewall. Thanks in advance for any help you can provide.
Sorry, I wasn't clear enough. I was basically explaining why I need to establish the static IP. I know how to punch a hole in the firewall using firewalld. After adding the static IP, the server can only ping internal network nodes, not anything on the Internet. Knowing this, I expect that I have to fix this problem before going on to the firewall. Thanks in advance for any help you can provide.
Ping is based on ICMP, so if you see anything in the firewall settings make sure it's completely open, the Internet can act strange if ICMP is blocked.
Ok, thanks, but I use port forwarding to get to a database on the server from locations outside of the local network. So, I have a static IP, but in establishing that, lost connectivity to the internet. Can you help me get that restored with the static IP?
Sorry, I kind of missed that. So you have no Internet connectivity at all? The firewall should be set to allow all outgoing traffic to anywhere.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.