Solved

CentOS 5.5 Setup as a Gateway Router for PC's attached to it...

Posted on 2011-02-24
10
900 Views
Last Modified: 2012-05-11
Say, What are teh settings required. N/W is as follows:
Local lan on eth0: 192.168.10.1/24
eth0:1: 192.168.1.1/24 Virtual port for ppp0 connection.
ppp0 uses eth0:1 and connects to the internet through adsl modem connected to same switch as eth0
PC's on local LAN need internet connection and I need port forwarding to them.
0
Comment
Question by:shaunwingin
  • 3
  • 3
  • 3
  • +1
10 Comments
 
LVL 61

Accepted Solution

by:
gheist earned 500 total points
ID: 34978546
This should work:
http://www.linuxtopia.org/online_books/centos_linux_guides/centos_linux_security_guide/s1-firewall-ipt-fwd.html
i.e CentOS should be default router to all clients preferably via DHCP, and their NAT-ED connections should go via ppp interface.
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 34978692
Hi,

This would never happen. ppp0 is the name of the interface and can not be used as an alias to ppp0.

So your interfaces should be ppp0 and eth0.

if you want masquarading between thenm you can do it with iptables. But please reddefine the circumstance and support them with outputs from your /etc/sysconfig/iptables and and your ipconfig outputs.

Cheers,
K.
0
 

Author Comment

by:shaunwingin
ID: 34978934
eth0:1 is a virtual interface and ppp0 should be able to use it....
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 34979068
> eth0:1 is a virtual interface and ppp0 should be able to use it....

You are wrong it is not a virtual interface but rather an alias interface to the eth0 so it is strcitly attached to the eth0 so no ppp0 traffic will flow through it.
0
 

Author Comment

by:shaunwingin
ID: 34979192
Ok Tx. What then if add a 2nd interface called eth1 and attach the pppo device to this and have the traffic directed through it?
This is a planned setup and don't have iptables to send you.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 34979221
Ok but this will never happen this way. eth0 is the ethernet interface and ppp0 is your modem interface. Why are you trying to change it to eth? They are both legal interfaces. You can easily address your ppp0 interface through iptables so in fact using it wont cause you any trouble when defining iptables rules.
0
 
LVL 19

Expert Comment

by:bevhost
ID: 34983747
If you want IPv6
/etc/sysconfig/network
NETWORKING_IPV6=yes 
IPV6_DEFAULTDEV="tun6to4" 
IPV6FORWARDING=yes

/etc/sysconfig/network-scripts/ifcfg-ppp0 
IPV6INIT=yes
IPV6TO4INIT=yes 
IPV6TO4_ROUTING="eth0-:1::0/64"
IPV6_CONTROL_RADVD=yes

Open in new window

0
 
LVL 19

Expert Comment

by:bevhost
ID: 34983755
And you might need to
yum install radvd

Open in new window

0
 
LVL 19

Expert Comment

by:bevhost
ID: 34983772
0
 

Author Closing Comment

by:shaunwingin
ID: 35117465
Haven't managed to test.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now