LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-14-2006, 04:14 PM   #1
vbsaltydog
Member
 
Registered: Nov 2005
Distribution: CentOS
Posts: 154

Rep: Reputation: 15
shorewall on centos


Task: setup shorewall with multiple public ips on a single external nic card to forward http and https requests to internal web server(s).

Proposed Solution: shorewall with 2 interfaces, external nic using aliases for multi-ip addressing and dnat rules for each public ip to each private ip for each secure domain.

Current problem: When I bind an alias to my external nic by copying the file /network-scripts/ifcfg-eth1 to /network-scripts/ifcfg-eth1:0 and then modifying the new file to suit new ip and card name and restarting the network service all seems well. The results of ifconfig show both nics and I can ping both addresses but I cant seem to get shorewall to recognize the eth1:0 nic.

Any advise is appreciated.

Also, is port forwarding for each alias the best solution or would 1 to 1 nat be better suited for this setup?
 
Old 04-14-2006, 08:50 PM   #2
javaroast
Member
 
Registered: Apr 2005
Posts: 131

Rep: Reputation: 19
From the Shorewall documentation http://www.shorewall.net/Shorewall_a...nterfaces.html

The ifconfig utility is being gradually phased out in favor of the ip utility which is part of the iproute package. The ip utility does not use the concept of aliases or virtual interfaces but rather treats additional addresses on an interface as objects in their own right.

ip addr add 206.124.146.178/24 dev eth0

I use this method on a corporate firewall that has over 30 IP's with no problems.
 
Old 04-14-2006, 08:53 PM   #3
vbsaltydog
Member
 
Registered: Nov 2005
Distribution: CentOS
Posts: 154

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by javaroast
ip addr add 206.124.146.178/24 dev eth0
where do you place this code and do you still need the ifcfg-ethX:X file under the network-scripts directory?
 
Old 04-15-2006, 02:57 AM   #4
javaroast
Member
 
Registered: Apr 2005
Posts: 131

Rep: Reputation: 19
I run mine in rc.local, because I have some other things running there and it's convenient for me. You won't need an ifcfg-ethX:X file as the ip address is assigned to the dev ethX that you use.
 
Old 04-17-2006, 12:19 AM   #5
vbsaltydog
Member
 
Registered: Nov 2005
Distribution: CentOS
Posts: 154

Original Poster
Rep: Reputation: 15
Thank you. I added the code to rc.local and it works great.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
shorewall config question with /etc/shorewall/rules peter72 Linux - Networking 3 01-01-2007 09:33 PM
Whats the differnce between Centos and CentOS? duffmckagan cAos 1 06-12-2005 12:23 PM
update centos 4 rc1 to centos 4 trou yum? maxut cAos 2 03-04-2005 02:36 AM
Centos 3.3 againstms Linux - General 3 12-24-2004 12:39 AM
CentOS Obie Linux - Security 3 05-10-2004 01:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 03:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration