LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-29-2001, 08:21 PM   #1
Bashkir
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, 09:57 PM   #2
billsabub
Member
 
Registered: Feb 2001
Posts: 109

Rep: Reputation: 15
Are you on a network?

A static ip would be put in the /etc/hosts file:

10.0.0.1 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.

HTH.
 
Old 04-29-2001, 11:31 PM   #3
Bashkir
LQ Newbie
 
Registered: Mar 2001
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks!

It is on ethernet at school. I'm going to be running a Counter-Strike server off of a T3.
 
Old 04-30-2001, 04:04 AM   #4
raz
Member
 
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 255.255.255.252 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.

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

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

/Raz
 
  


Reply


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 10:51 AM
Is there any static ARP for static IP network? linux_lover2005 Linux - Networking 2 05-18-2005 12:01 PM
no static ip need help kwickcut Mandriva 1 12-07-2004 06:59 PM
Can't use static IP linuxistan Linux - Networking 5 10-17-2004 09:26 PM
FC2 Overriding static if in favor of dhcp system set for static pkraus109 Linux - Networking 8 09-21-2004 11:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

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