LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-11-2008, 04:06 AM   #1
claymore_letifer
LQ Newbie
 
Registered: Jun 2008
Posts: 2

Rep: Reputation: 0
need help with iptables for comcast


ok so i have had bell south for a long time and finally got sick of losing connection once week cause of bad phone lines. so i switched to comcast. so i took my old linux box i used for bell south and i am trying to get it to work for comcast as a router/fire wall. i am able to access web pages on the the box connected to the cable modem but when i go to any other box on my network all i can do is ping if i try to access the a web page i get sent to comcasts saying please contact customer support. or if i try to use telnet to get the page i get this:
telnet yahoo.com 80
Trying 68.87.64.132...
Connected to yahoo.com (68.87.64.132).
Escape character is '^]'.
GET /
HTTP/1.1 403 Forbidden
Server:ServerIron/9.1
Connection: close
Content-Length: 0

Connection closed by foreign host.

now if i do this on my box connected to the modem i get the html code like i should.

i have the fallowing rules set in iptables:

$iptables -t nat -A PREROUTING -j ACCEPT
$iptables -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT
$iptables - A FORWARD -i eth1 -o eth0 -j ACCEPT
$iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

my modem is connected to eth0 and my lan eth1

i have heard that comcast monitors there traffic for weird mac addresses but i thought masquerade took care of that. could some one please help me out on this please. i would get all my computers back online and scene all comcast tech support would say is we don't support linux or routers there not going to help and i really don't want to switch back to bell south
 
Old 06-11-2008, 11:23 PM   #2
dkm999
Member
 
Registered: Nov 2006
Location: Seattle, WA
Distribution: Fedora
Posts: 407

Rep: Reputation: 35
Oops. I hope you meant that you wanted a POLICY in the nat table of ACCEPT, not to just accept any packet that comes along. The effect of your rules is that the MASQUERADE is never acted on, since the earlier rule stops the flow through the nat table. I think you actually want this:
Code:
$iptables -t nat -P PREROUTING ACCEPT
$iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
$iptables -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT
$iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
It would also be a pretty nice idea to put some restrictions on the INPUT chain as well, to protect your firewall machine itself from the baddies.
 
Old 06-13-2008, 03:25 PM   #3
claymore_letifer
LQ Newbie
 
Registered: Jun 2008
Posts: 2

Original Poster
Rep: Reputation: 0
your tables example gives me the same results i still can't browse the internet. but thank you. i think this is some kind of filtering on comcast's end which is why i was asking if anyone had a way around it. because if i take one of my computers and change is mac address to the one that my gateway has and then plug it into the modem directly it works but the second i try to route with it all traffic but http request can't go though i am even able to ssh form a computer in my network out to ones out side its just web sites give that 403 error. i know you can route with a linksys router but i would prefer to do with with my linux box for security reasons. so if any one out there with a linux gateway set up for comcast could please help me with this it would be great.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
A Comcast Mystery rdwinders General 4 01-21-2007 02:52 AM
iptables v1.2.9: Unknown arg `/sbin/iptables' Try `iptables -h' or 'iptables --help' Niceman2005 Linux - Security 4 12-29-2005 08:20 PM
Re:comcast internet fng_#1 Mandriva 6 11-12-2004 12:53 PM
comcast internet gonnaWorkItOut Linux - Networking 10 10-20-2003 12:37 PM
Comcast Questions tarballedtux Linux - Networking 1 02-28-2002 12:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:42 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