Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 04-29-2001, 09:21 PM   #1
LQ Newbie
Registered: Mar 2001
Posts: 12

Rep: Reputation: 0

How can I set a static ip through linux? Is it possible?
Old 04-29-2001, 10:57 PM   #2
Registered: Feb 2001
Posts: 109

Rep: Reputation: 15
Are you on a network?

A static ip would be put in the /etc/hosts file: localhost loghost
123.456.123.456 'name'

Then make sure the hostname ('name') is entered in the appropriate file (e.g. hostname.le0 for an ethernet connection).

You'll also have to make sure your netmask is set correctly for your network.

Try running netconf. There should be prompts to fill out this information.

Old 04-30-2001, 12:31 AM   #3
LQ Newbie
Registered: Mar 2001
Posts: 12

Original Poster
Rep: Reputation: 0

It is on ethernet at school. I'm going to be running a Counter-Strike server off of a T3.
Old 04-30-2001, 05:04 AM   #4
Registered: Apr 2001
Location: London
Posts: 408

Rep: Reputation: 31
You'll need to do three things.

Note: if your school uses a firewall then the CT port for the server will be blocked.

First you'll need root access to the server.
then add a new interface: "x.x.x.x is the external address that you are allowed to use"

# ifconfig eth0:0 x.x.x.x netmask up
Then add the line in your /etc/hosts file
(x.x.x.x = external IP address, nameofsystem = servers host name)
x.x.x.x nameofsystem localhost

Now you'll have to give your internal interface a route to your external interface if you want it to talk out through it.

# echo 1 > /proc/sys/net/ipv4/ip_forward
route add default gw xxx-gw eth0:0

"xxx-gw = your T3's router."



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Howto Assign Multiple Static Public IP Addresses under SBC's PPPoE Static Ip system o trekgraham Linux - Networking 8 04-17-2007 11:51 AM
Is there any static ARP for static IP network? linux_lover2005 Linux - Networking 2 05-18-2005 01:01 PM
no static ip need help kwickcut Mandriva 1 12-07-2004 07:59 PM
Can't use static IP linuxistan Linux - Networking 5 10-17-2004 10:26 PM
FC2 Overriding static if in favor of dhcp system set for static pkraus109 Linux - Networking 8 09-21-2004 12:13 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:02 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration