Skip to content
View in the app

A better way to browse. Learn more.

Gear Crushers

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

CentOS on Intranet and Internet (2 NIC)

Featured Replies

To make a connection between two NIC's (one being local intranet and the other being on the internet), you need to setup NAT by using iptables (linux firewall)



Run these commands to achieve NAT



eth0 is internet eth1 is local




yum install iptables

iptables --flush

iptables --table nat --flush

iptables --delete-chain

iptables --table nat --delete-chain

iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE

iptables --append FORWARD --in-interface eth1 -j ACCEPT

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

service iptables restart



  • Moderators

For some reason I had to type the path in front of iptables in CentOS 5.5



yum install iptables



/sbin/iptables --flush



/sbin/iptables --table nat --flush



/sbin/iptables --delete-chain



/sbin/iptables --table nat --delete-chain



/sbin/iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE



/sbin/iptables --append FORWARD --in-interface eth1 -j ACCEPT



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



service iptables restart



/etc/init.d/iptables restart





  • Author

Here is a better explanation







To accept all packets incoming on a particular interface, in this case the localhost interface:



iptables -A INPUT -i lo -j ACCEPT










Suppose we have 2 separate interfaces, eth1 which is our internal LAN connection and eth0 which is our external internet connection. We may want to allow all incoming packets on our internal LAN but still filter incoming packets on our external internet connection. We could do this as follows:






iptables -A INPUT -i lo -j ACCEPT


iptables -A INPUT -i eth1 -j ACCEPT














But be very careful - if we were to allow all packets for our external internet interface (for example, eth0 internet connection):



iptables -A INPUT -i eth0 -j ACCEPT



we would have effectively just disabled our firewall!



Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.