- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Put this where? : /sbin/iptables -t nat -A POSTROU...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-23-2016 11:11 PM
тАО06-23-2016 11:11 PM
Good Morning Ladies & Gentlemen;
I have a small network in my house (16 hosts). I connected the cable MODEM to "blacktower" on the p1p1 intf.
Blacktower's em1 intf is on the local net. All the hosts can ping/telnet/ssh etc, to each other.
I want the other 15 hosts to go thru blacktower to access the internet.
I did some (actually A LOT) of searching and found what I needed to do. I edited the /etc/sysctl.conf file and then executed the command: "/sbin/iptables -t nat -A POSTROUTING -o p1p1 -j MASQUERADE". Everything worked.
And my question is: Where do I put that command so that it is executed during boot time (I put it in the /etc/rc..local and that worked - but I'd like to put it where it should be)?
Thank you in advance for any and all help
regards, tonyp
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-26-2016 06:27 PM
тАО06-26-2016 06:27 PM
SolutionAfter executing the command "/sbin/iptables -t nat -A ....", save iptables rules, by running:
# service iptables save
this will write changes into /etc/sysconfig/iptables, and this will survive reboots.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-27-2016 09:11 AM
тАО06-27-2016 09:11 AM
Re: Put this where? : /sbin/iptables -t nat -A POSTROUTING -o p1p1 -j MASQUERADE
Hello medosena;
Thank you for your suggestion. It worked great!