Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Hosting and Servers
  4. Anyone have any experience with Linux Routing?

Anyone have any experience with Linux Routing?

Scheduled Pinned Locked Moved Hosting and Servers
sysadminlinuxhelpquestion
4 Posts 2 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jkirkerx
    wrote on last edited by
    #1

    I have a Linux box I use for a firewall with iptables, and I need to put my mail server on the right ip address for proper reverse DNS Lookup. So I can take inbound packets and NAT them to the mail server, but I need to take outbound packets from the mail server, and send them on a different IP address. The IPTables sends everything out on the same IP, which is 1, but I need 5. I thinking maybe I could add another gateway, using route, below is my main route, I'd like to add 192.168.3.5 to use a gateway of 69.199.126.198, Am I on the right track here?, I could use some help on this

    /sbin/route add default gw 69.199.126.193 dev eth0
    /sbin/route add -net 192.168.3.0 netmask 255.255.255.0 gw 192.168.3.1 dev eth1

    J T 2 Replies Last reply
    0
    • J jkirkerx

      I have a Linux box I use for a firewall with iptables, and I need to put my mail server on the right ip address for proper reverse DNS Lookup. So I can take inbound packets and NAT them to the mail server, but I need to take outbound packets from the mail server, and send them on a different IP address. The IPTables sends everything out on the same IP, which is 1, but I need 5. I thinking maybe I could add another gateway, using route, below is my main route, I'd like to add 192.168.3.5 to use a gateway of 69.199.126.198, Am I on the right track here?, I could use some help on this

      /sbin/route add default gw 69.199.126.193 dev eth0
      /sbin/route add -net 192.168.3.0 netmask 255.255.255.0 gw 192.168.3.1 dev eth1

      J Offline
      J Offline
      jkirkerx
      wrote on last edited by
      #2

      I had 2 addresses bound to the mail server adapter, and was only SNAT 1 of them, so I added a SNAT to the other address, and now the mail server responds on the correct ip address for reverse dns and resolves correctly. So I didn't need a 2nd gateway address, or need to add any additional routing, turned out to be pretty easy. Only took me years to figure out.

      1 Reply Last reply
      0
      • J jkirkerx

        I have a Linux box I use for a firewall with iptables, and I need to put my mail server on the right ip address for proper reverse DNS Lookup. So I can take inbound packets and NAT them to the mail server, but I need to take outbound packets from the mail server, and send them on a different IP address. The IPTables sends everything out on the same IP, which is 1, but I need 5. I thinking maybe I could add another gateway, using route, below is my main route, I'd like to add 192.168.3.5 to use a gateway of 69.199.126.198, Am I on the right track here?, I could use some help on this

        /sbin/route add default gw 69.199.126.193 dev eth0
        /sbin/route add -net 192.168.3.0 netmask 255.255.255.0 gw 192.168.3.1 dev eth1

        T Offline
        T Offline
        tkserv2011
        wrote on last edited by
        #3

        try to copy the first ip to your pc and try again should be solved

        J 1 Reply Last reply
        0
        • T tkserv2011

          try to copy the first ip to your pc and try again should be solved

          J Offline
          J Offline
          jkirkerx
          wrote on last edited by
          #4

          I want to take all new smtp packets generated inside the network, and send them out on a different ip address, and not the gateway address, so the ipaddress reverses back to the correct ptr record, indicating it's a mail a server that belongs to my domain. Right now, the packets go out on the gateway, with a different reverse ptr record.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups