Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am new to Linux CentOS, I would like to setup a router that will perform NAT but I have never done it before and I really need some help from you guys!! Greatly appreciated!!
I am running CentOS 5 with GNU Zebra to act as my router, (again, I am new to all these things even to the Zebra
I would like to configure NAT with iptables but I do not know how exactly to do it, please help me!!
I have checked with my network cards with command of "ls /etc/sysconfig/network-scripts/ifcfg-eth* | wc -l" and the output is "2"
but to be honest, I need some help from here. . .
please be as detailed as possible, that will help alot!!
For future reference, it's important to give your threads titles that tell us as much as possible in a few words - this thread could have been titled 'Set up CentOS as a router' or 'Linux router configuration' or even 'I'm having trouble configuring my box as a router'. You get the idea. A thread called 'foobar!' will get a lot more interest from people who are interested in foobar than a thread called 'Help!!!'. In fact, the only reason I came to this thread was to share that bit of good practice with you.
That said, you should take a look at that link, but notably, it's a bit dated. I'll give you two possible pointers - firestarter is a GUI that will configure this up nicely, though I don't really like it due to the interface sucking a little bit and the desire for finer controls than it really allows. That's easy mode. If you want to do this on medium, look into shorewall - it's command-line, but it ships with a set of config files for the network configuration you want and after that you only have to read all of them and open the ports you want. Your call.
Hard mode, by the way, is using iptables directly, for which both of those are frontends. I do not recommend this. iptables makes sense but is rather painful to use, especially compared to the GUI of firestarter or the feature-oriented configs of shorewall.
Okay, I will be more specific next time, thank you for reminding me
Quote:
Originally Posted by karamarisan
For future reference, it's important to give your threads titles that tell us as much as possible in a few words - this thread could have been titled 'Set up CentOS as a router' or 'Linux router configuration' or even 'I'm having trouble configuring my box as a router'. You get the idea. A thread called 'foobar!' will get a lot more interest from people who are interested in foobar than a thread called 'Help!!!'. In fact, the only reason I came to this thread was to share that bit of good practice with you.
That said, you should take a look at that link, but notably, it's a bit dated. I'll give you two possible pointers - firestarter is a GUI that will configure this up nicely, though I don't really like it due to the interface sucking a little bit and the desire for finer controls than it really allows. That's easy mode. If you want to do this on medium, look into shorewall - it's command-line, but it ships with a set of config files for the network configuration you want and after that you only have to read all of them and open the ports you want. Your call.
Hard mode, by the way, is using iptables directly, for which both of those are frontends. I do not recommend this. iptables makes sense but is rather painful to use, especially compared to the GUI of firestarter or the feature-oriented configs of shorewall.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.