Assigning a public TCP/IP address is no different than assigning any other TCP/IP address. Your networking equipment and/or network service provider need to provide the necessary port forwarding and routing.
You can try to use the system-config-network command line or graphical tool to configure basic networking. Implementation and availability depends on your installed system.
For more information and advanced configurations I suggest to see the Networking section of the Deployment Guide for your Linux release version at https://linux.oracle.com/documentation
Ajay Sharma wrote:
I want to assign Public IP address to my OEL. What are the steps for it.
Do you have an IP address to assign? The public IPv4 address range is exhausted. So no ISP is simply going to give customers static public IPs to use.
An ISP typically has a DHCP server and a pool of public IPs that are handed out to clients when connecting. With local hosting contracts/accounts, one may get a static IP allocated to you - but expect to pay extra for that.
The usual configuration is to configure your router for making the ISP connection and getting an IP on the Internet. You then configure your LAN devices to use the router as default routing gateway.
If you want to host a web server for example on a LAN device, you should consider using a NAT firewall on the router (supported by most in my experience). For example, your router has LAN IP 192.168.0.1. Your LAN web server has IP 192.168.0.20. The ISP address allocated to your router is 22.214.171.124.
On the router you configure port 80 to be NAT'ed to 192.168.0.20 using port 80. This means an Internet connection to 126.96.36.199 will be passed by the router to your web server.
Of course, as the public IP is leased by your router, it can expire, and a new public IP address given when the lease is refreshed. So you cannot exactly give out a DHCP IP to Internet users to connect to your web server. The solution is dynamic DNS. Again, many routers support this - automatically telling the dynamic DNS service what the current public IP address is for your web server's Internet hostname. This hostname you need to register with the dynamic DNS folk (and pay for) - and allows you to have an Internet presence via a dynamic public IP.
Even if you are lucky enough to have your own dedicated public Internet IP - I suggest NOT using without very CAREFUL consideration. This IP will be attacked by hackers. Not might be. Will be. It will be probed for weaknesses. Weaknesses will be exploited. Fact.
So if you want to assign a public Internet IP to your Linux server, you MUST harden the server. Latest patches. Service management. Solid iptables configuration. Consider running SELinux in fully active mode. Constant monitoring of server logs.
Most of which a router will protect you against with a much easier and simplistic web admin interface - and by protecting your servers via NAT.