How can I make a router using CentOS 7

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












Route a print server



I am asking this community for some advice on routing using a CentOS 7 server. This situation is as follows:



I have an external print server (let’s say it’s on subnet 10.0.0.0/24 with an IP of 10.0.0.13).
I have a CentOS 7 server with external IP of 10.0.0.5 on eth0 and an internal IP of 198.162.0.130 on eth1. This internal NIC is connected to a printer that has an IP of 10.0.0.4.



Here is what I have tried:



1) Enabling ip forwarding



echo net.ipv4.ip_forward=1 >> /etc/sysctl.conf


2) Adding a route



ip route add 10.0.0.4 dev eth1


3) Attempted adding a rule



ip rule add nat 10.0.0.4 from 10.0.0.13


(CentOS responded that this command is deprecated)



4) I’ve attempted a lot of things using shorewalld, firewalld, and iptables.service. Right now I have iptables service enabled and have issued the following commands (policy on all chains set to drop, exclusions being accept on port 22 and 9100)



iptables -A FORWARD -p tcp –dport 9100 -m conntrack –ctstate NEW,ESTABLISHED -j ACCEPT
iptables -A FORWARD -p tcp –sport 9100 -m conntrack –ctstate ESTABLISHED -j ACCEPT


(Including variations on these commands that include specific IP addresses and interface names).



5) I’ve even modified the network-scripts for my eth0 file to include the IP address of the printer (note printer and print server are on the same subnet).









share









New contributor




Sheldon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.























    up vote
    0
    down vote

    favorite












    Route a print server



    I am asking this community for some advice on routing using a CentOS 7 server. This situation is as follows:



    I have an external print server (let’s say it’s on subnet 10.0.0.0/24 with an IP of 10.0.0.13).
    I have a CentOS 7 server with external IP of 10.0.0.5 on eth0 and an internal IP of 198.162.0.130 on eth1. This internal NIC is connected to a printer that has an IP of 10.0.0.4.



    Here is what I have tried:



    1) Enabling ip forwarding



    echo net.ipv4.ip_forward=1 >> /etc/sysctl.conf


    2) Adding a route



    ip route add 10.0.0.4 dev eth1


    3) Attempted adding a rule



    ip rule add nat 10.0.0.4 from 10.0.0.13


    (CentOS responded that this command is deprecated)



    4) I’ve attempted a lot of things using shorewalld, firewalld, and iptables.service. Right now I have iptables service enabled and have issued the following commands (policy on all chains set to drop, exclusions being accept on port 22 and 9100)



    iptables -A FORWARD -p tcp –dport 9100 -m conntrack –ctstate NEW,ESTABLISHED -j ACCEPT
    iptables -A FORWARD -p tcp –sport 9100 -m conntrack –ctstate ESTABLISHED -j ACCEPT


    (Including variations on these commands that include specific IP addresses and interface names).



    5) I’ve even modified the network-scripts for my eth0 file to include the IP address of the printer (note printer and print server are on the same subnet).









    share









    New contributor




    Sheldon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      Route a print server



      I am asking this community for some advice on routing using a CentOS 7 server. This situation is as follows:



      I have an external print server (let’s say it’s on subnet 10.0.0.0/24 with an IP of 10.0.0.13).
      I have a CentOS 7 server with external IP of 10.0.0.5 on eth0 and an internal IP of 198.162.0.130 on eth1. This internal NIC is connected to a printer that has an IP of 10.0.0.4.



      Here is what I have tried:



      1) Enabling ip forwarding



      echo net.ipv4.ip_forward=1 >> /etc/sysctl.conf


      2) Adding a route



      ip route add 10.0.0.4 dev eth1


      3) Attempted adding a rule



      ip rule add nat 10.0.0.4 from 10.0.0.13


      (CentOS responded that this command is deprecated)



      4) I’ve attempted a lot of things using shorewalld, firewalld, and iptables.service. Right now I have iptables service enabled and have issued the following commands (policy on all chains set to drop, exclusions being accept on port 22 and 9100)



      iptables -A FORWARD -p tcp –dport 9100 -m conntrack –ctstate NEW,ESTABLISHED -j ACCEPT
      iptables -A FORWARD -p tcp –sport 9100 -m conntrack –ctstate ESTABLISHED -j ACCEPT


      (Including variations on these commands that include specific IP addresses and interface names).



      5) I’ve even modified the network-scripts for my eth0 file to include the IP address of the printer (note printer and print server are on the same subnet).









      share









      New contributor




      Sheldon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      Route a print server



      I am asking this community for some advice on routing using a CentOS 7 server. This situation is as follows:



      I have an external print server (let’s say it’s on subnet 10.0.0.0/24 with an IP of 10.0.0.13).
      I have a CentOS 7 server with external IP of 10.0.0.5 on eth0 and an internal IP of 198.162.0.130 on eth1. This internal NIC is connected to a printer that has an IP of 10.0.0.4.



      Here is what I have tried:



      1) Enabling ip forwarding



      echo net.ipv4.ip_forward=1 >> /etc/sysctl.conf


      2) Adding a route



      ip route add 10.0.0.4 dev eth1


      3) Attempted adding a rule



      ip rule add nat 10.0.0.4 from 10.0.0.13


      (CentOS responded that this command is deprecated)



      4) I’ve attempted a lot of things using shorewalld, firewalld, and iptables.service. Right now I have iptables service enabled and have issued the following commands (policy on all chains set to drop, exclusions being accept on port 22 and 9100)



      iptables -A FORWARD -p tcp –dport 9100 -m conntrack –ctstate NEW,ESTABLISHED -j ACCEPT
      iptables -A FORWARD -p tcp –sport 9100 -m conntrack –ctstate ESTABLISHED -j ACCEPT


      (Including variations on these commands that include specific IP addresses and interface names).



      5) I’ve even modified the network-scripts for my eth0 file to include the IP address of the printer (note printer and print server are on the same subnet).







      centos networking iptables routing





      share









      New contributor




      Sheldon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share









      New contributor




      Sheldon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share



      share








      edited 4 mins ago









      Rui F Ribeiro

      37.1k1274118




      37.1k1274118






      New contributor




      Sheldon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 6 mins ago









      Sheldon

      12




      12




      New contributor




      Sheldon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Sheldon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Sheldon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );






          Sheldon is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f476427%2fhow-can-i-make-a-router-using-centos-7%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          Sheldon is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          Sheldon is a new contributor. Be nice, and check out our Code of Conduct.












          Sheldon is a new contributor. Be nice, and check out our Code of Conduct.











          Sheldon is a new contributor. Be nice, and check out our Code of Conduct.













           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f476427%2fhow-can-i-make-a-router-using-centos-7%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay