[CentOS] OT: Setting a CentOS to gateway a private IP address

Les Mikesell lesmikesell at gmail.com
Tue Oct 21 21:22:30 UTC 2008


James B. Byrne wrote:
> 
>> Seems like your trying to route through the linux box? Have you
>> enabled ip forwarding and checked your iptables ruleset to make
>> sure that either the default policy is ACCEPT or that you have
>> specific rules in there that allow forwarding?
>>
> 
> I believe so.
> 
> # cat /proc/sys/net/ipv4/ip_forward
> 1
> # iptables -L -n
> ...
> blah blah
> ...
> ACCEPT     all  --  0.0.0.0/0            192.168.219.0/24
> REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with
> icmp-host-prohibited

Do you permit returning packets somewhere?

> 
> To be sure that the firewall was not the source of trouble I temporarily
> turned it off and observed no change in behaviour from that previously
> reported.
> 
> Another correspondent pointed out that I may need to run routed to
> propagate the routing information from the host to the network.

Or apply static routes on the other network - or NAT to the connecting 
interface address on the way out.

-- 
   Les Mikesell
    lesmikesell at gmail.com



More information about the CentOS mailing list