How can I setup a Linux firewall router for my public class C IP block?
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
How can I setup a Linux firewall router for my public class C IP block?
How can I setup a Linux firewall router for my public class C IP block?
My ISP has given me a T1 line with the IP's
69.25.19.0/24
69.25.19.0 Network
69.25.19.1 Gateway
69.25.19.255 Broadcast
I have a server with 2 nic cards, 1 nic card has my t1 line, the other has a cat 5 going to my switch, and I want to set it up to handle all the traffic and filter it with IPtables. How can I route all traffic through that server?
I know I have to run:
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -P FORWARD ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to ?????
What do I make the IP's of my 2 nic cards? What do I use as the gateway of my server with the 2 nics? What do my servers on the switch use for the gateway?
Ok, then you don't want to do any natting. In fact, you should just be able to activate ip_forward, set the FORWARD chain to ACCEPT and they'll be online. You can then tighten down your security.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.