Static IP & Port Forwarding

Leonard Chatagnier lenc5570 at
Tue Dec 2 22:03:46 UTC 2008

--- On Mon, 12/1/08, ALAN CHE <alanccs at> wrote:

> From: ALAN CHE <alanccs at>
> Subject: Static IP & Port Forwarding
> To: ubuntu-users at
> Date: Monday, December 1, 2008, 11:31 PM
> I am new to Linux and never use it before.
> I have install Ubuntu 8.10 Desktop Edition and face some
> problems.
> (a)  I know that Ubuntu can itself auto detect the
> networking for me, but
> I prefer to handle it manually. I was wondering where &
> how can I set a
> fixed ip, subnet mask, gateway, DNS and etc.
> (b)  I also need to know where & how can I do the port
> forwarding in
> Ubuntu.
> I will appreciate if you can answer me in an easy way and
> in details
> because I was not very familiar with the Linux commands.
> Thank you very much.
Well, no expert either but think you can do a manual setup in several places:

edit /etc/network/interfaces
use ifconfig (need to read man "ifconfig")
and manually edit network manager. If your experienced in networking the entries should be intuitive, if not your going to have to read the manuals and maybe google also. I'll give you an example of what my /etc/network/interfaces file looks like; maybe it will help:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
#iface eth0 inet dhcp

iface eth0 inet static

auto dsl-provider
iface dsl-provider inet ppp
pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf
provider dsl-provider
lchata at ubuntu-intrepid-64bit:~/tempdir$

My setup is for attyahoo dsl static IPs. You may need info from your ISP on what IPs to use for your system if you don't already know. This is an Intrepid setup. Some people have had a good deal of problems using network manager for static IP's, FWIW. I used the interfaces file to chang mine from DHCP to static. Since you are new to linux here is one way to edit the file:

sudo nano /etc/network/interfaces

The file has root priviledges so you need sudo. Nano is the kde default editor.  And the type of entries that go into it for static IP setup is shown above.  Good luck.

Leonard Chatagnier
lenc5570 at

More information about the ubuntu-users mailing list