Welcome, Guest
You have to register before you can post on our site.



Search Forums

(Advanced Search)

Forum Statistics
» Members: 5,095
» Latest member: WandaEveline
» Forum threads: 4,026
» Forum posts: 16,399

Full Statistics

Online Users
There are currently 100 online users.
» 0 Member(s) | 96 Guest(s)
Applebot, Bing, Google, Yandex

Latest Threads
Im back.....
Forum: Hello
Last Post: anyweb
2021-01-17, 11:36 AM
» Replies: 1
» Views: 1,167
add mp3 plugin to xmms in...
Forum: Fedora
Last Post: anyweb
2021-01-17, 11:30 AM
» Replies: 11
» Views: 31,151
Configuring VSFTPd Server
Forum: FTP Server
Last Post: Johnbaca
2020-10-14, 10:25 AM
» Replies: 32
» Views: 53,347
Wolf won't play sound!
Forum: Game Problems
Last Post: Guest
2020-10-03, 05:51 PM
» Replies: 1
» Views: 13,258
Using git + python
Forum: How Do I?
Last Post: Clueless puppy
2020-08-21, 04:37 PM
» Replies: 0
» Views: 4,353
what does your nick mean ...
Forum: Hello
Last Post: volt
2020-08-06, 03:25 PM
» Replies: 28
» Views: 20,437
CentOS vs.?
Forum: Just Starting Linux
Last Post: volt
2020-08-06, 02:29 PM
» Replies: 0
» Views: 4,284
I displaced my linux part...
Forum: Just Starting Linux
Last Post: MarvoIke
2020-05-20, 09:05 PM
» Replies: 0
» Views: 679
Argument errors help plea...
Forum: How Do I?
Last Post: illiterate_newb
2020-02-23, 07:02 PM
» Replies: 0
» Views: 1,076
Drive Question
Forum: How Do I?
Last Post: anyweb
2020-01-13, 08:29 PM
» Replies: 1
» Views: 946

  Setup a simple NAT in linux
Posted by: anyweb - 2003-12-11, 04:50 PM - Forum: Security and Firewalls - Replies (2)

First things first, to do this i assume you have TWO working network cards in your computer, one is connected to the internet (WAN) and the other is connected to your local network (LAN), or think of it as eth0 (WAN) and eth1 (LAN). I also assume that you want eth1 to share the internet with others, however, i am not going to enable a dhcp server, so your 'clients' will have to have their ip settings entered manually. If you want to try this then read on...


First off we need to know the ip address of our WAN network card (eth0 the one connected direct to the internet ;-)). So, as root type ifconfig.

That should present you with an output like the following example:-



Quote:eth0Link encap:Ethernet HWaddr 00:06:5B:02:F6:FF

inet addr: Bcast: Mask:





Link encap:Ethernet HWaddr 00:02:2D:46:B2:5F

inet addr: Bcast: Mask:


In the example above i have a WAN (eth0) address which is my connection to the internet via another NAT (lol), and it has the ip address of


The LAN (eth1) IP address in this example has been set to


Ive deliberately set eth1 to so i know its my 'sharing' NAT ip address, and it's the one to point to later.

To set/change your IP settings for a Network card in Red Hat 9 type this as root:-

neat or redhat-config-network


Now that you have set your LAN (eth1) IP address, lets get sharing !!!

As root in a console type the following two lines:-


iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to




echo 1 > /proc/sys/net/ipv4/ip_forward




Obviously the first line which points to MUST point to your CURRENT WAN IP address (eth0) and NOT my example here.

So if your eth0 ip address= then the line should read


iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to


Ok, now that is done, now its time to test it, if you have lokkit running (redhats firewall) disable it temporarily to test please.


On a client pc, edit it's TCPIP properties as follows


IP address= (or any value above 1 and up to 255)


Default Gateway= (eth1)

DNS server 1= (eth0)

DNS Server 2= (my first NAT, which shares ips to my eth0 WAN connection, change this to your WANS DNS server ip)



You will have to put the lines below in /etc/rc.d/rc.local if you want to turn it (the NAT) on every time your system boots up.


iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to xxx.xxx.xxx.xxx
echo 1 > /proc/sys/net/ipv4/ip_forward


Obviously replace xxx.xxx.xxx.xxx with the ip of your current WAN (internet) address.


Thats it, test it by pinging www.google.com.


you might also want to read the following....


Quote:In order for your system to save the iptables rules ...You will need to edit /etc/sysconfig/iptables-config and make sure IPTABLES_MODULES_UNLOAD, IPTABLES_SAVE_ON_STOP, and IPTABLES_SAVE_ON_RESTART are all set to 'yes'.

Print this item

Posted by: Guest - 2003-12-11, 04:21 PM - Forum: General Chat - Replies (2)


Print this item

  dhcp howto for redhat linux 9/fedora
Posted by: Guest - 2003-12-11, 03:18 PM - Forum: Network Problems - Replies (2)

anybody got a good one, post the link pls.



Print this item

  my linux shots
Posted by: Guest - 2003-12-11, 03:13 PM - Forum: Linux - No Replies

[Image: screenshot-9.png]


fedora core test 3


nice huh ?

Print this item

  test screenshot
Posted by: anyweb - 2003-12-11, 02:56 PM - Forum: Windows - Replies (4)

[Image: postinstall_10.jpg]


test !

Print this item

  need for speed unleashed and ati radeon 9800 pro
Posted by: anyweb - 2003-12-11, 02:25 PM - Forum: Game Problems - Replies (5)

hi guys


im having a problem getting the ati radeon 9800 pro to work with Need For Speed Unleashed,


the game plays fine but all the menus are distorted and i cannot read some text,


ive updated the ati catalyst drivers to the latest and no joy, and ive applied the latest update to NFSU


my other pc is similarly configured and has an nvidia geforce 4 ti 4600, and the same game doesnt have any problems


any ideas ? [img]<___base_url___>/uploads/emoticons/default_rolleyes.gif[/img]





Print this item

Posted by: KobrAs - 2003-12-11, 02:13 PM - Forum: General Chat - Replies (4)

Yo my man :)it works (i think) I`m not good in forums but what a hell its all just text... we need the text not the graphics :P


Print this item

Posted by: Guest - 2003-12-11, 01:25 PM - Forum: General Chat - Replies (9)

Hello anyweb it's my 'Andriy' from HTAS


Nice forums, where's the off-topic forum?? ;)

Print this item